# ActivityPub 插件

**URL:** https://meta.discourse.org/t/activitypub-plugin/266794
**Category:** Plugin
**Tags:** experimental, activitypub
**Created:** [2023年五月31日 17:21 UTC](https://meta.discourse.org/t/activitypub-plugin/266794 "2023-05-31T17:21:52Z")
**Posts on this page:** 20
**Page:** 8

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [2024年二月27日 08:13 UTC](https://meta.discourse.org/t/activitypub-plugin/266794/145 "2024-02-27T08:13:57Z")

</div>

很难说，因为我无法访问您尝试过的 Mastodon 服务器。但我怀疑是 HTTP 签名问题。我已将为 HTTP 签名问题添加更好的日志记录列入议程，这可能会对此有所阐明。稍后在同一服务器上重试。这可能是您在关闭签名后立即获得的失败搜索的缓存问题。

---

<div class="post-metadata">

### Author: ![evilham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/evilham/32/365688_2.png) [@evilham](https://meta.discourse.org/u/evilham)
#### Post date: [2024年二月27日 14:40 UTC](https://meta.discourse.org/t/activitypub-plugin/266794/146 "2024-02-27T14:40:59Z")

</div>

嗯，不对，仍然是 404。

考虑到我尝试使用了广泛使用的公共服务器（其中一个我以前从未用过，也没有理由将其账户缓存在其中），我猜测即使是从 Mastodon 来看，无法关注也将是最普遍的体验。

我注意到你是 `mastodon.pavilion.tech` 的管理员，如果你能分享该服务器在 HTTP 签名方面可能启用了互操作性的任何（可能是非默认的）设置，那将是极好的，这既有助于查明问题/当前限制，也可能有助于贡献 :-)。

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [2024年二月27日 15:08 UTC](https://meta.discourse.org/t/activitypub-plugin/266794/147 "2024-02-27T15:08:16Z")

</div>

这是一个标准的 Mastodon 服务器。你可能会通过自定义设置弄坏东西。但如果你运行的是标准的 Mastodon 服务器，该插件就会起作用。该插件在许多其他实例上都能正常工作。例如，你可以在 `mastodon.social` 上关注 #announcements。

 ![Screenshot 2024-02-27 at 17.04.12](https://global.discourse-cdn.com/meta/original/4X/4/4/0/44094f98089d3dfdd1204a6a59df394ea97f5d61.png)

正如你所说，你的 actor 在那里找不到。还有别的事情发生。你是否在使用 Cloudflare？你是否尝试过其他自定义设置？你是否可以访问你的 Web 服务器（例如 nginx）日志？

@evilham 我已向你发送私信以进一步调试，这样我们就不会占用这个话题。

---

<div class="post-metadata">

### Author: ![Mte90](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mte90/32/120441_2.png) [@Mte90](https://meta.discourse.org/u/Mte90)
#### Post date: [2024年二月28日 10:53 UTC](https://meta.discourse.org/t/activitypub-plugin/266794/148 "2024-02-28T10:53:01Z")

</div>

我遇到了同样的问题，我发布了这个 [Typofixer per la lingua italiana - Progetti - forum.linux.it](https://forum.linux.it/t/typofixer-per-la-lingua-italiana/1282) 类别已启用 activitypub，应该是 @progetti@forum.linux.it  
从这里我看到存在 [https://forum.linux.it/.well-known/webfinger?resource=acct:progetti@forum.linux.it](https://forum.linux.it/.well-known/webfinger?resource=acct:progetti@forum.linux.it)

 ![image](https://global.discourse-cdn.com/meta/original/4X/6/e/d/6ed268927fa2c6e33d1a11df63fa77633674bf7b.png)

有没有办法检查它是否确实像链接一样被发布了？  
我看到用户可以关注它，但在 mastodon 上搜索却找不到。

我禁用了 HTTP 签名并启用了日志（两个选项），但我在 /logs 中没有找到关于此插件的任何信息。

我还发布了这个以进行双重检查 [ShareBackported estensione per Firefox - Progetti - forum.linux.it](https://forum.linux.it/t/sharebackported-estensione-per-firefox/1283)

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [2024年二月28日 11:27 UTC](https://meta.discourse.org/t/activitypub-plugin/266794/149 "2024-02-28T11:27:54Z")

</div>

感谢您的报告@Mte90，我将很快添加更多日志来阐明此场景。感谢您的耐心！

抄送@evilham。

---

<div class="post-metadata">

### Author: ![hellekin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hellekin/32/51636_2.png) [@hellekin](https://meta.discourse.org/u/hellekin)
#### Post date: [2024年二月28日 19:05 UTC](https://meta.discourse.org/t/activitypub-plugin/266794/150 "2024-02-28T19:05:40Z")

</div>

> [@angus](#):
>
> 您看到的这条消息是在 Actor 没有关注者时记录的（不会发布任何活动）。有人关注这个 Actor 吗？

我处于子类别相同的情况，也没有关注者。但是当我尝试关注时，我收到一个错误：

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/8/d/78de61a7e7717bbc57177d1a227d21b629c30052.png)

错误没有被记录。尝试从 Mastodon 发送一个关注活动会得到一个 404。

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [2024年二月29日 06:49 UTC](https://meta.discourse.org/t/activitypub-plugin/266794/151 "2024-02-29T06:49:16Z")

</div>

嘿 @hellekin，感谢你的报告。这可能是一个不同的问题。直接访问 [ps.s10y.eu](http://ps.s10y.eu) 时，我看到它存在一些问题，例如

 ![IMG_8267](https://global.discourse-cdn.com/meta/original/4X/2/9/f/29f7a214b73bf0df0abcae53f50523dffcc865c3.jpeg)

不过，请耐心等待，我将为这个案例添加更多日志。

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [2024年二月29日 08:51 UTC](https://meta.discourse.org/t/activitypub-plugin/266794/152 "2024-02-29T08:51:14Z")

</div>

@hellekin @evilham @Mte90 感谢您的耐心等待！我已提交一个 PR 以记录此插件从外部参与者那里发送回来的所有传入请求错误。

> <https://github.com/discourse/discourse-activity-pub/pull/71>
>
> See further https://meta.discourse.org/t/activitypub-plugin/266794/152?u=angus

当此 PR 合并后，请更新您的插件，然后如果您能：

1. 确保已启用详细日志记录（站点设置“activity pub verbose logging”）；以及

2. 尝试执行您之前尝试过的完全相同的操作。

同时请牢记几点：

1. 已经存在超过 26 种不同的传入请求错误场景。虽然表面上可能相似，但您的问题可能与其他人的问题不同，因此具体性是关键，即您采取的具体步骤。

2. 失败的请求已将具体的错误消息返回给尝试请求的参与者，因此如果您可以访问它们，您可能还想检查您尝试连接到 Discourse 的参与者的日志。

我渴望听到您的进展，并进一步调查您的每个案例。再次感谢！

---

<div class="post-metadata">

### Author: ![Mte90](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mte90/32/120441_2.png) [@Mte90](https://meta.discourse.org/u/Mte90)
#### Post date: [2024年二月29日 11:03 UTC](https://meta.discourse.org/t/activitypub-plugin/266794/153 "2024-02-29T11:03:20Z")

</div>

我也遇到了同样的问题，也许提供更多关于为什么无效的信息会有帮助。

> [@angus](#):
>
> 当这个PR合并时

等待，以便我可以做更多的测试 🙂

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [2024年二月29日 18:36 UTC](https://meta.discourse.org/t/activitypub-plugin/266794/154 "2024-02-29T18:36:53Z")

</div>

谢谢 Angus，此 PR 现已合并。

---

<div class="post-metadata">

### Author: ![hellekin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hellekin/32/51636_2.png) [@hellekin](https://meta.discourse.org/u/hellekin)
#### Post date: [2024年三月1日 18:39 UTC](https://meta.discourse.org/t/activitypub-plugin/266794/155 "2024-03-01T18:39:19Z")

</div>

我喜欢我们现在可以与其他 Discourse 实例共享主题的事实！

> **[Federation with the SocialHub](https://ich.taler.net/t/federation-with-the-socialhub/97)**
>
> We’re experimenting with Discourse ActivityPub federation. This is #GoTALER speaking to #Fediversity.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [2024年三月4日 13:47 UTC](https://meta.discourse.org/t/activitypub-plugin/266794/156 "2024-03-04T13:47:15Z")

</div>

> [@Lhc\_fl](#):
>
> 看起来在文章模式下，非拉丁字符用户名会出现问题。用户名需要被编码吗？

嘿 @Lhc_fl 抱歉这么晚才回复，您能详细说明一下您的意思吗？或许可以举个例子？

---

<div class="post-metadata">

### Author: ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)
#### Post date: [2024年三月5日 02:26 UTC](https://meta.discourse.org/t/activitypub-plugin/266794/157 "2024-03-05T02:26:30Z")

</div>

我有一段时间没试过了，但上次试的时候，如果我的用户名包含非拉丁字符（例如 `@零卡`），我的帖子在 Mastodon 上就无法查看。

但除了我目前的 Discourse 站点的一些问题（_也包括我的生活_）之外，我已无法再进行测试。

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [2024年三月5日 09:08 UTC](https://meta.discourse.org/t/activitypub-plugin/266794/158 "2024-03-05T09:08:49Z")

</div>

啊，我明白了。

> [@Lhc\_fl](#):
>
> 如果我的用户名包含非拉丁字符（例如 `@零卡`），我的帖子在 Mastodon 上将不可见。

看起来 Mastodon 不支持用户名中的非拉丁字符。

> <https://github.com/mastodon/mastodon/issues/6830>
>
> Currently, the username can only be letters, numbers and underscores.
> 
> The use…rs in my LDAP directory have uids like "firstname.lastname" with their mail "firstname.lastname@example.com".
> 
> With the current implementation, mastodon does not create a profile for the users as there is a "dot" in the username.
> 
> I think that my situation can be quite common, especially with LDAP integration as sysadmins will not want to create a new ID just for mastodon.
> 
> Why doesn't mastodon support extended usernames? Am I missing some obvious reason?
> 
> As another solution, it should be possible to authenticate to mastodon with the email adress from the LDAP directory. With the current solution (setting LDAP\_UID=mail), the user creation fails with the error regarding the "letters/numbers only".
> 
> 
> \* \* \* \*
> 
> \- \[X\] I searched or browsed the repo’s other issues to ensure this is not a duplicate.
> \- \[X\] This bug happens on a \[tagged release\](https://github.com/tootsuite/mastodon/releases) and not on \`master\` (If you're a user, don't worry about this).

> <https://github.com/mastodon/mastodon/issues/1121>
>
> From https://mastodon.cx/users/saqeram/updates/6117
> 
> To better support users f…rom non-roman languages (Arabic, Japanese, Korean, Hebrew Chinese being big examples) it would be wise to find a way to better support those characters in usernames and domains, as well as improve RTL support
> 
> \* \* \* \*
> 
> \- \[X\] I searched or browsed the repo’s other issues to ensure this is not a duplicate.

可能需要将您的 ActivityPub Actor 的用户名转换为拉丁字符。我正在查看这个问题。

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [2024年三月5日 15:27 UTC](https://meta.discourse.org/t/activitypub-plugin/266794/159 "2024-03-05T15:27:33Z")

</div>

> [@angus](#):
>
> 可能需要将您的 ActivityPub Actor 的用户名转换为拉丁字符。我正在查看这个问题。

这将在合并时得到解决

> <https://github.com/discourse/discourse-activity-pub/pull/75>
>
> @pmusaraj This ensures user actor usernames are valid for ActivityPub (ASCII), r…egardless of what kind of usernames the Discourse instance supports.
> 
> See further: https://meta.discourse.org/t/activitypub-plugin/266794/158?u=angus

无法在 Fediverse 中使用的用户名（即非 ASCII 字符）将被自动转换为其用户名的合规变体，用于用户的 Actor 用户名（他们的 Discourse 用户名将保持不变）。我可能还会添加允许用户更改其 ActivityPub 用户名的功能（因此，如果您的 Discourse 用户名是非 ASCII 字符，您将不会仅仅被卡在自动转换的 ActivityPub 用户名上）。

---

<div class="post-metadata">

### Author: ![jordan.vidrine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan.vidrine/32/515563_2.png) [@jordan.vidrine](https://meta.discourse.org/u/jordan.vidrine)
#### Post date: [2024年三月7日 21:06 UTC](https://meta.discourse.org/t/activitypub-plugin/266794/160 "2024-03-07T21:06:58Z")

</div>

当导航到启用了 ActivityPub 的类别时，是否可以在 body 中添加一个类？

ActivityPub 视图的主题列表的标记与 Discourse 的其他核心页面略有不同，导致某些主题无法正确设置此页面的样式。

例如，在使用 `meta-branded` 主题并访问 → [https://meta.discourse.org/ap/category/67/followers](https://meta.discourse.org/ap/category/67/followers) 时，可以在 meta 上看到一个示例。

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/6/e/c6e5c3831e619fc6697c7e9a28becb9ac1dc10be.png)

通常，顶部导航区域包含在 `list-controls` 中。

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/b/c/cbc44261136bf26763c4e6d8f2a1489d24bf3154.png)

在其下方包含在 `list-container` 中。

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/7/c/77cb269458d71208388fe159414bc3fc4b2d4cf3.png)

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [2024年三月8日 14:46 UTC](https://meta.discourse.org/t/activitypub-plugin/266794/161 "2024-03-08T14:46:05Z")

</div>

是的，我们应该在插件中做些什么来解决这个问题。我来看看。谢谢！

---

<div class="post-metadata">

### Author: ![gde](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gde/32/481170_2.png) [@gde](https://meta.discourse.org/u/gde)
#### Post date: [2024年三月29日 10:39 UTC](https://meta.discourse.org/t/activitypub-plugin/266794/162 "2024-03-29T10:39:29Z")

</div>

您好，

我正在试用该插件，并注意到 `[note][/note]` 标签被忽略，所有内容都已发布。

我查看了选项，但没有发现任何明显可以解释这一点的地方。

**将此类别中的帖子发布为的 ActivityPub 类型** ：笔记  
**ActivityPub 发布类型** ：第一篇帖子

是我遗漏了什么，还是其他人也遇到了这种情况？

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [2024年四月1日 09:18 UTC](https://meta.discourse.org/t/activitypub-plugin/266794/163 "2024-04-01T09:18:24Z")

</div>

嘿 @gde,

> [@gde](#):
>
> **将此类别中的帖子发布的 ActivityPub 类型** ：Note

这个之前一直设置为 Note 吗？你之前是将其设置为 Article 吗？

---

<div class="post-metadata">

### Author: ![gde](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gde/32/481170_2.png) [@gde](https://meta.discourse.org/u/gde)
#### Post date: [2024年四月1日 11:17 UTC](https://meta.discourse.org/t/activitypub-plugin/266794/164 "2024-04-01T11:17:04Z")

</div>

您好 @angus ，

是的，主要目标从来都不是发布文章，所以我从未将其设置为“文章”。

[上一頁](https://meta.discourse.org/t/activitypub-plugin/266794.md?page=7)

[下一頁](https://meta.discourse.org/t/activitypub-plugin/266794.md?page=9)
