mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02: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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user