diff options
author | 2021-07-11 16:22:21 +0200 | |
---|---|---|
committer | 2021-07-11 16:22:21 +0200 | |
commit | 846057f0d696fded87d105dec1245e9ba32763ce (patch) | |
tree | 9a4914c07bcf189a3eea0a2c091567c56cdf4963 /internal/processing/processor.go | |
parent | favourites GET implementation (#95) (diff) | |
download | gotosocial-846057f0d696fded87d105dec1245e9ba32763ce.tar.xz |
Block/unblock (#96)
* remote + local block logic, incl. federation
* improve blocking stuff
* fiddle with display of blocked profiles
* go fmt
Diffstat (limited to 'internal/processing/processor.go')
-rw-r--r-- | internal/processing/processor.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/internal/processing/processor.go b/internal/processing/processor.go index bb4cd2da7..a09a370e9 100644 --- a/internal/processing/processor.go +++ b/internal/processing/processor.go @@ -82,6 +82,10 @@ type Processor interface { AccountFollowCreate(authed *oauth.Auth, form *apimodel.AccountFollowRequest) (*apimodel.Relationship, gtserror.WithCode) // AccountFollowRemove handles the removal of a follow/follow request to an account, either remote or local. AccountFollowRemove(authed *oauth.Auth, targetAccountID string) (*apimodel.Relationship, gtserror.WithCode) + // AccountBlockCreate handles the creation of a block from authed account to target account, either remote or local. + AccountBlockCreate(authed *oauth.Auth, targetAccountID string) (*apimodel.Relationship, gtserror.WithCode) + // AccountBlockRemove handles the removal of a block from authed account to target account, either remote or local. + AccountBlockRemove(authed *oauth.Auth, targetAccountID string) (*apimodel.Relationship, gtserror.WithCode) // AdminEmojiCreate handles the creation of a new instance emoji by an admin, using the given form. AdminEmojiCreate(authed *oauth.Auth, form *apimodel.EmojiCreateRequest) (*apimodel.Emoji, error) @@ -99,6 +103,9 @@ type Processor interface { // AppCreate processes the creation of a new API application AppCreate(authed *oauth.Auth, form *apimodel.ApplicationCreateRequest) (*apimodel.Application, error) + // BlocksGet returns a list of accounts blocked by the requesting account. + BlocksGet(authed *oauth.Auth, maxID string, sinceID string, limit int) (*apimodel.BlocksResponse, gtserror.WithCode) + // FileGet handles the fetching of a media attachment file via the fileserver. FileGet(authed *oauth.Auth, form *apimodel.GetContentRequestForm) (*apimodel.Content, error) @@ -275,14 +282,14 @@ func (p *processor) Start() error { for { select { case clientMsg := <-p.fromClientAPI: - p.log.Infof("received message FROM client API: %+v", clientMsg) + p.log.Tracef("received message FROM client API: %+v", clientMsg) go func() { if err := p.processFromClientAPI(clientMsg); err != nil { p.log.Error(err) } }() case federatorMsg := <-p.fromFederator: - p.log.Infof("received message FROM federator: %+v", federatorMsg) + p.log.Tracef("received message FROM federator: %+v", federatorMsg) go func() { if err := p.processFromFederator(federatorMsg); err != nil { p.log.Error(err) |