mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 09:22:26 -05:00
[feature] Accept incoming federated Flag activity (#1382)
* start working on handling incoming Flag activity * interim commit * federate Flag in successfully
This commit is contained in:
parent
faeb7ded3b
commit
993aae5e48
11 changed files with 560 additions and 50 deletions
|
|
@ -82,6 +82,9 @@ func (p *processor) ProcessFromFederator(ctx context.Context, federatorMsg messa
|
|||
case ap.ActivityBlock:
|
||||
// CREATE A BLOCK
|
||||
return p.processCreateBlockFromFederator(ctx, federatorMsg)
|
||||
case ap.ActivityFlag:
|
||||
// CREATE A FLAG / REPORT
|
||||
return p.processCreateFlagFromFederator(ctx, federatorMsg)
|
||||
}
|
||||
case ap.ActivityUpdate:
|
||||
// UPDATE SOMETHING
|
||||
|
|
@ -357,6 +360,13 @@ func (p *processor) processCreateBlockFromFederator(ctx context.Context, federat
|
|||
return nil
|
||||
}
|
||||
|
||||
func (p *processor) processCreateFlagFromFederator(ctx context.Context, federatorMsg messages.FromFederator) error {
|
||||
// TODO: handle side effects of flag creation:
|
||||
// - send email to admins
|
||||
// - notify admins
|
||||
return nil
|
||||
}
|
||||
|
||||
// processUpdateAccountFromFederator handles Activity Update and Object Profile
|
||||
func (p *processor) processUpdateAccountFromFederator(ctx context.Context, federatorMsg messages.FromFederator) error {
|
||||
incomingAccount, ok := federatorMsg.GTSModel.(*gtsmodel.Account)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue