go-fed / activity

ActivityStreams & ActivityPub in golang, oh my!
BSD 3-Clause "New" or "Revised" License
711 stars 111 forks source link

Change InboxForActor => InboxesForIRI #156

Closed tsmethurst closed 2 years ago

tsmethurst commented 2 years ago

This PR updates one of the database interface functions to allow returning a slice of Inbox IRIs in response to an ActorIRI, instead of only one output IRI per input IRI.

The rationale here is that often a followers Collection iri would be passed into InboxForActor, which would be unable to return just one inbox, leading each actor in the collection to be dereferenced anyway (many expensive and pointless http calls).

Now, the inbox IRIs of each actor in a collection can be returned, which should avoid implementations from having to trawl remote servers as hard.

tsmethurst commented 2 years ago

There's an implementation example here :)

https://github.com/superseriousbusiness/gotosocial/pull/446