summaryrefslogtreecommitdiff
path: root/internal/db/relationship.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-07-08 16:43:12 +0200
committerLibravatar GitHub <noreply@github.com>2023-07-08 16:43:12 +0200
commitf40bb02f31ca72f1528cf40291e86024509e34d6 (patch)
tree9f68132057fc882a0b733ce037ea46bec0a3627b /internal/db/relationship.go
parent[docs] Clarify how to add a page (#1959) (diff)
downloadgotosocial-f40bb02f31ca72f1528cf40291e86024509e34d6.tar.xz
[bugfix] Delete mutual follow (requests) when receiving block from remote (#1960)
* [bugfix] Delete mutual follow (requests) on block * fix test
Diffstat (limited to 'internal/db/relationship.go')
-rw-r--r--internal/db/relationship.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/db/relationship.go b/internal/db/relationship.go
index 99093591c..e4b81c003 100644
--- a/internal/db/relationship.go
+++ b/internal/db/relationship.go
@@ -97,12 +97,18 @@ type Relationship interface {
// UpdateFollowRequest updates one follow request by ID.
UpdateFollowRequest(ctx context.Context, followRequest *gtsmodel.FollowRequest, columns ...string) error
+ // DeleteFollow deletes a follow if it exists between source and target accounts.
+ DeleteFollow(ctx context.Context, sourceAccountID string, targetAccountID string) error
+
// DeleteFollowByID deletes a follow from the database with the given ID.
DeleteFollowByID(ctx context.Context, id string) error
// DeleteFollowByURI deletes a follow from the database with the given URI.
DeleteFollowByURI(ctx context.Context, uri string) error
+ // DeleteFollowRequest deletes a follow request if it exists between source and target accounts.
+ DeleteFollowRequest(ctx context.Context, sourceAccountID string, targetAccountID string) error
+
// DeleteFollowRequestByID deletes a follow request from the database with the given ID.
DeleteFollowRequestByID(ctx context.Context, id string) error