mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 14:52:26 -05:00
Serve outbox for Actor (#289)
* add statusesvisible convenience function * add minID + onlyPublic to account statuses get * move swagger collection stuff to common * start working on Outbox GETting * move functions into federationProcessor * outboxToASCollection * add statusesvisible convenience function * add minID + onlyPublic to account statuses get * move swagger collection stuff to common * start working on Outbox GETting * move functions into federationProcessor * outboxToASCollection * bit more work on outbox paging * wrapNoteInCreate function * test + hook up the processor functions * don't do prev + next links on empty reply * test get outbox through api * don't fail on no status entries * add outbox implementation doc * typo
This commit is contained in:
parent
26a95ad27d
commit
4b1d9d3780
38 changed files with 1851 additions and 470 deletions
|
|
@ -135,6 +135,19 @@ func (f *federatingDB) NewID(ctx context.Context, t vocab.Type) (idURL *url.URL,
|
|||
return idProp.GetIRI(), nil
|
||||
}
|
||||
}
|
||||
case ap.ActivityCreate:
|
||||
// CREATE
|
||||
// ID might already be set on a Create, so check it here and return it if it is
|
||||
create, ok := t.(vocab.ActivityStreamsCreate)
|
||||
if !ok {
|
||||
return nil, errors.New("newid: create couldn't be parsed into vocab.ActivityStreamsCreate")
|
||||
}
|
||||
idProp := create.GetJSONLDId()
|
||||
if idProp != nil {
|
||||
if idProp.IsIRI() {
|
||||
return idProp.GetIRI(), nil
|
||||
}
|
||||
}
|
||||
case ap.ActivityAnnounce:
|
||||
// ANNOUNCE aka BOOST
|
||||
// ID might already be set on an announce we've created, so check it here and return it if it is
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue