我无法弄清楚如何将任何帖子联合到 Mastodon,我可以很好地关注参与者。当 Discourse 尝试发送帖子时,我在日志中收到以下错误:
[Discourse Activity Pub] https://discuss.privacyguides.net/ap/actor/a93549c3c7883784eda700f30de0c96b failed to deliver to https://mstdn.party/users/staff/inbox --- !ruby/hash:ActiveSupport::HashWithIn
[Discourse Activity Pub] POST request to https://mastodon.neat.computer/users/jonah/inbox failed: Expected([200, 201, 202]) <=> Actual(401 Unauthorized)
[Discourse Activity Pub] https://discuss.privacyguides.net/ap/actor/227cc2ddaa4ded69c2a58214031da3ce failed to deliver to https://mastodon.neat.computer/users/jonah/inbox --- !ruby/hash:ActiveSupport:
[Discourse Activity Pub] POST request to https://mstdn.party/users/staff/inbox failed: Expected([200, 201, 202]) <=> Actual(401 Unauthorized)
我禁用了 Activity pub require signed requests 并启用了设置中的日志记录,否则所有设置都保持默认。这些 Mastodon 实例位于 Cloudflare 后面,但我可以看到 Cloudflare 没有阻止请求,并且 mastodon-web 服务日志显示 Mastodon 本身正在返回 401 代码(尽管我不知道如何增加 Mastodon 日志的详细程度以查看原因)。
有什么原因会导致这种情况发生吗?
编辑:Mastodon 不喜欢 HTTP 签名,尽管此实例没有启用 Authorized Fetch:
Mar 08 16:47:07 neat-mastodon bundle[3119591]: D, [2025-03-08T16:47:07.963455 #3119591] DEBUG -- : [e6b2bc50-09e1-464e-a937-4c43ef32bd99] Signature verification failed: Request not signed
Mar 08 16:47:07 neat-mastodon bundle[3119591]: I, [2025-03-08T16:47:07.964520 #3119591] INFO -- : [e6b2bc50-09e1-464e-a937-4c43ef32bd99] method=POST path=/users/jonah/inbox format=html controller=ActivityPub::InboxesController action=create status=401 allocations=1256 duration=9.15 view=0.69 db=1.86
编辑 2:似乎我的 Discourse 用户的收件箱无法访问:https://verify.funfedi.dev/?actor_uri=jonah%40discuss.privacyguides.net
"Resolving acct:jonah@discuss.privacyguides.net using webfinger",
"Resolved to https://discuss.privacyguides.net/ap/actor/227cc2ddaa4ded69c2a58214031da3ce",
"Running verification for alice",
"Got inbox None", [...]
它确实像预期的那样适用于群组参与者:https://verify.funfedi.dev/?actor_uri=articles%40discuss.privacyguides.net ![]()
编辑 3:对于 GET 请求到 https://discuss.privacyguides.net/ap/actor/227cc2ddaa4ded69c2a58214031da3ce
{
"id": "https://discuss.privacyguides.net/ap/actor/227cc2ddaa4ded69c2a58214031da3ce",
"type": "Person",
"updated": "2025-03-08T06:34:19Z",
"url": "https://discuss.privacyguides.net/u/jonah",
"name": "Jonah Aragon",
"inbox": null,
"outbox": null,
"sharedInbox": "https://discuss.privacyguides.net/ap/users/inbox",
"followers": "https://discuss.privacyguides.net/ap/actor/227cc2ddaa4ded69c2a58214031da3ce/followers",
"preferredUsername": "jonah",
"icon": {
"type": "Image",
"mediaType": "image/png",
"url": "https://forum-cdn.privacyguides.net/user_avatar/discuss.privacyguides.net/jonah/96/8151_2.png"
},
"@context": "https://www.w3.org/ns/activitystreams"
}
