diff options
author | 2021-05-22 14:26:45 +0200 | |
---|---|---|
committer | 2021-05-22 14:26:45 +0200 | |
commit | 43c3a47773a71db9fb49589a72273fe823947dcf (patch) | |
tree | 25b075c3049618dec9c3afaaca69b8059bb4d77f /internal/message/frprocess.go | |
parent | Home timeline (#28) (diff) | |
download | gotosocial-43c3a47773a71db9fb49589a72273fe823947dcf.tar.xz |
Admin cli (#29)
Now you can use the CLI tool to:
* Create a new account with the given username, email address and password (which will be hashed of course).
* Confirm the account's so that it can log in and post.
* Promote the account to admin.
* Demote the account from admin.
* Disable the account.
* Suspend the account.
Diffstat (limited to 'internal/message/frprocess.go')
-rw-r--r-- | internal/message/frprocess.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/internal/message/frprocess.go b/internal/message/frprocess.go index e229dcfbb..5d02836e6 100644 --- a/internal/message/frprocess.go +++ b/internal/message/frprocess.go @@ -54,9 +54,22 @@ func (p *processor) FollowRequestAccept(auth *oauth.Auth, accountID string) (*ap return nil, NewErrorNotFound(err) } + originAccount := >smodel.Account{} + if err := p.db.GetByID(follow.AccountID, originAccount); err != nil { + return nil, NewErrorInternalError(err) + } + + targetAccount := >smodel.Account{} + if err := p.db.GetByID(follow.TargetAccountID, targetAccount); err != nil { + return nil, NewErrorInternalError(err) + } + p.fromClientAPI <- gtsmodel.FromClientAPI{ + APObjectType: gtsmodel.ActivityStreamsFollow, APActivityType: gtsmodel.ActivityStreamsAccept, GTSModel: follow, + OriginAccount: originAccount, + TargetAccount: targetAccount, } gtsR, err := p.db.GetRelationship(auth.Account.ID, accountID) |