Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Posts delivered by buzzrelay is blocked by Misskey #4

Open
Ninlives opened this issue Jun 23, 2023 · 5 comments
Open

Posts delivered by buzzrelay is blocked by Misskey #4

Ninlives opened this issue Jun 23, 2023 · 5 comments

Comments

@Ninlives
Copy link

Problem

Subscribe to buzzrelay on Misskey does not show any posts because they are all blocked by the server with the following error:

failed(UnrecoverableError: skip: signerHost(<hostname/of/buzzrelay>) !== activity.id host(<relayed/instance>) 

Findings

Misskey will check if the host of the signature's keyId is equal to the host of the activity id, and activity will be blocked if they do not match:
https://github.com/misskey-dev/misskey/blob/e2261b63e9053fb5116dd0ef393f464bf16da190/packages/backend/src/queue/processors/InboxProcessorService.ts#L159

@Ninlives
Copy link
Author

Simply replace the id field of the sent activity would fix the problem (I use format!("{}/{}", actor_id, post_url) to construct the id). By the way, all post relayed by buzzrelay appears to be a renote (boost in mastodon) by actor @instance-<host>, is this intended? A little bit annoying because I have to mute @instance-<host> otherwise every post would show up twice in the timeline :(

@astro
Copy link
Owner

astro commented Jun 23, 2023

id identifies a post so we cannot modify it or they show up as duplicates, which is what you witnessed.

I wonder if this is this really the part of Misskey that processes posts from relays?

@Ninlives
Copy link
Author

They are not duplicates, but Misskey would show both the renote event and the note being renoted in the global timeline, just like how it treats normal renotes, but not suitable for a relay in my opinion (How does Mastodon handle this? I guess the post being boosted is not shown on timeline?)

It is part of the process, the UnrecoverableError appears every time a relayed post arrive.

I'm still a noob in fediverse and my knowledge about ActivityPub is extremely limited so please correct me if I made stupid mistakes again, but according to my understanding of the protocol, id in the Announce activity should identify the Announce itself, not the post being announced. I did not find any direct evidence from the specification, but:

  1. Object Identifier indicates the id should be Publicly dereferencable URIs, such as HTTPS URIs, with their authority belonging to that of their originating server. Here the Announce activity is originated from buzzrelay, and the actor also lives on buzzrelay.
  2. All Create activity in example have different id with the post being created, my understanding is that this applies to Announce activity as well.

astro added a commit that referenced this issue Jun 25, 2023
@astro
Copy link
Owner

astro commented Jun 25, 2023

Now running with 89938a7. Does that improve things? Does that break things?

It doesn't look like I have to actually serve these URLs. So far I'm not getting requests for them.

@Ninlives
Copy link
Author

It works fine on my Misskey instance, I hope it does not break other fediverse servers.
The relayed posts are showed up as renotes, but this should be fixed by Misskey upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants