astro / buzzrelay

Source to relay.fedi.buzz: relay the streaming API of Mastodon instances
https://relay.fedi.buzz
GNU Affero General Public License v3.0
70 stars 9 forks source link

Every actor has an unique outbox url #9

Closed rafaelcaricio closed 11 months ago

rafaelcaricio commented 11 months ago

The fix for #7 is breaking GoToSocial. It expects every actor to have a unique outbox address.

22:14:22 - timestamp="07/08/2023 20:14:22.646" func=middleware.Logger.func1.1 level=ERROR latency="150.92003ms" userAgent="Mastodon/591 CFNetwork/1469 Darwin/21.3.0" method=GET statusCode=500 path=/api/v2/search clientIP=172.18.0.1 error="Error #01: Get: error searching by URI: byURI: error looking up https://relay.fedi.buzz/tag/fedibuzz as account: enrichAccount: error putting in database: ERROR: duplicate key value violates unique constraint \"new_accounts_outbox_uri_key\" (SQLSTATE 23505)\n" requestID=3znt5mc904001d50f4v0 msg="Internal Server Error: wrote 54B"
voxpelli commented 11 months ago

Has this been reported to https://github.com/superseriousbusiness/gotosocial as well? If so, could you provide the issue number so that this PR and that issue can be linked together for future reference? And if not, can you file it?

This is mainly a shortcoming of GoToSocial

rafaelcaricio commented 11 months ago

@voxpelli Could you please explain to me how did you get to the conclusion that this is "mainly a shortcoming of GoToSocial"?

Outbox URLs returns posts of the specific Actor. If you have a global URL, as a server implementer, you will not know which actor posts to reply to that request.

Please read the ActivityPub relevant section of the spec, also linked in the ticket #7:

outbox An [ActivityStreams] OrderedCollection comprised of all the messages produced by the actor; see 5.1 Outbox.

The part "produced by the actor" implies that are only posts from the actor being looked up, thus cannot be a shared outbox.

voxpelli commented 11 months ago

@rafaelcaricio Is there a MUST be unique or similar in the spec? Else assuming that it will be unique is not spec compliant

rafaelcaricio commented 11 months ago

It needs to be unique, so you can reply only with the posts by the actor.

voxpelli commented 11 months ago

It needs to be unique, so you can reply only with the posts by the actor.

@rafaelcaricio This might be so, but that's a shortcoming of the spec then.

If the collection needs to be unique, then it should state so using the MUST keyword.

There is no such thing as an implied MUST or SHOULD in a spec like this.

Nowhere in 5. does it mention that the collections defined for an actor has to be unique to that actor.

It doesn't even say that the content of that collection has to have any specific sender or receiver.