yukimochi / Activity-Relay

Yet another powerful customizable ActivityPub relay server written in Go.
https://relay.toot.yukimochi.jp/
GNU Affero General Public License v3.0
277 stars 39 forks source link

Akkoma instances unable to subscribe #96

Open mhamzahkhan opened 2 months ago

mhamzahkhan commented 2 months ago

I'm not sure if this is an Akkoma bug, or a bug with Activity-Relay, but I'm seeing issues with Akkoma users being unable to subscribe to my Activity-Relay instance.

I setup a test Akkoma instance to try and figure out what was going on, and found that it appears to be due to the /actor endpoint of Activity-Relay having a type of "Service". Modifying this to be type: "Application" appears to allow Akkoma instances to subscribe successfully.

Please let me know if this is an Akkoma bug, and I will open an issue with Akkoma instead. I couldn't find any guidance on what type it should be in the activitypub spec (https://www.w3.org/TR/activitypub).

Steps to Reproduce:

15:39:55.256 [error] error: :not_found Error while following https://relay.intahnet.co.uk/actor: :not_found

or repeatedly requesting /actor multiple times a second.
- Inspect the Activity-Relay /actor endpoint declaration and note the type: "Service" designation.

Expected Behavior:
- Akkoma instances should be able to successfully subscribe to Activity-Relay as it's a fork of Pleroma. 

Actual Behavior:
- Due to the /actor endpoint being categorized as type: "Service" in Activity-Relay's implementation, Akkoma instances are unable to subscribe. Either it outright rejects the follow attempt, or hammers /actor multiple times per second.

Workaround:
- Modifying the type declaration of the /actor endpoint in Activity-Relay to type: "Application" enables successful subscription from Akkoma instances:

modified /actor endpoint

~ $ curl -s https://relay.intahnet.co.uk/actor | jq | grep type "type": "Application",

Observe successful subscription from Akkoma

~ $ MIX_ENV=prod mix pleroma.relay follow https://relay.intahnet.co.uk/actor .... 16:32:11.487 [info] relay: followed instance: https://relay.intahnet.co.uk/actor; id=https://akkoma.intahnet.co.uk/activities/33a2dd78-6852-4af2-8def-f085e5d0733d

7shironana commented 2 months ago

This is due to a bug in Akkoma, not Relay. I was able to follow by updating Akkoma to 3.13 or higher. Please try it.