summaryrefslogtreecommitdiff
path: root/internal/db/relationship.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-10-16 13:27:43 +0200
committerLibravatar GitHub <noreply@github.com>2021-10-16 13:27:43 +0200
commit15621f5324b4613d83efb94711c97eeaa83da2b3 (patch)
treeb86c837dec89f5c74a7127f1bcd8e224bf6dd8a6 /internal/db/relationship.go
parentUser password change (#280) (diff)
downloadgotosocial-15621f5324b4613d83efb94711c97eeaa83da2b3.tar.xz
Follow request improvements (#282)
* tiny doc update * add rejectfollowrequest to db * add follow request reject to processor * add reject handler * tidy up follow request api * tidy up federation call * regenerate swagger docs * api endpoint tests * processor test * add reject federatingdb handler * start writing reject tests * test reject follow request * go fmt * increase sleep for slow test setups * more relaxed time.sleep
Diffstat (limited to 'internal/db/relationship.go')
-rw-r--r--internal/db/relationship.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/db/relationship.go b/internal/db/relationship.go
index c43b3d9ac..ac2df5228 100644
--- a/internal/db/relationship.go
+++ b/internal/db/relationship.go
@@ -54,6 +54,11 @@ type Relationship interface {
// It will return the newly created follow for further processing.
AcceptFollowRequest(ctx context.Context, originAccountID string, targetAccountID string) (*gtsmodel.Follow, Error)
+ // RejectFollowRequest fetches a follow request from the database, and then deletes it.
+ //
+ // The deleted follow request will be returned so that further processing can be done on it.
+ RejectFollowRequest(ctx context.Context, originAccountID string, targetAccountID string) (*gtsmodel.FollowRequest, Error)
+
// GetAccountFollowRequests returns all follow requests targeting the given account.
GetAccountFollowRequests(ctx context.Context, accountID string) ([]*gtsmodel.FollowRequest, Error)