gobengo / distbin

distributed social pastebin using Activitypub
https://distbin.com
Apache License 2.0
78 stars 8 forks source link

Discover inboxes of actors when doing inbox discovery #8

Closed gobengo closed 6 years ago

gobengo commented 6 years ago

@clacke pointed out in #6 that distbin would not discover inboxes of actors of resources we try to notify.

i.e. let's say Alice posts comment A. Bob replies to comment A with comment B (by posting comment A to distbin /outbox)

Previously (and still), if comment A itself has an as:inbox, distbin will notify that inbox. I call this a 'direct inbox' of the comment. With this PR, if there is no 'direct inbox', we will look for an 'as:actor' of comment A. And if we find that, we will look for an 'as:inbox' on that actor. If we find this 'actor inbox', we will notify it.

One downside of distbin before this, and after, is that it will only find a single inbox and deliver to it. Followup work on this should support finding multiple inboxes that need to be notified, and notifying all of them. But that can come later.