mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 01:32:26 -05:00
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
This commit is contained in:
parent
107685e22e
commit
15621f5324
24 changed files with 1256 additions and 69 deletions
|
|
@ -250,16 +250,17 @@ func (f *federator) FederatingCallbacks(ctx context.Context) (wrapped pub.Federa
|
|||
OnFollow: pub.OnFollowDoNothing,
|
||||
}
|
||||
|
||||
// override some default behaviors and trigger our own side effects
|
||||
other = []interface{}{
|
||||
// override default undo behavior and trigger our own side effects
|
||||
func(ctx context.Context, undo vocab.ActivityStreamsUndo) error {
|
||||
return f.FederatingDB().Undo(ctx, undo)
|
||||
},
|
||||
// override default accept behavior and trigger our own side effects
|
||||
func(ctx context.Context, accept vocab.ActivityStreamsAccept) error {
|
||||
return f.FederatingDB().Accept(ctx, accept)
|
||||
},
|
||||
// override default announce behavior and trigger our own side effects
|
||||
func(ctx context.Context, reject vocab.ActivityStreamsReject) error {
|
||||
return f.FederatingDB().Reject(ctx, reject)
|
||||
},
|
||||
func(ctx context.Context, announce vocab.ActivityStreamsAnnounce) error {
|
||||
return f.FederatingDB().Announce(ctx, announce)
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue