# 通过 activitypub 扩展提及

**URL:** https://meta.discourse.org/t/extended-mentions-via-activitypub/355602
**Category:** Feature
**Tags:** activitypub
**Created:** [2025年三月4日 08:55 UTC](https://meta.discourse.org/t/extended-mentions-via-activitypub/355602 "2025-03-04T08:55:10Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![thoka](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thoka/32/115652_2.png) [@thoka](https://meta.discourse.org/u/thoka)
#### Post date: [2025年三月4日 08:55 UTC](https://meta.discourse.org/t/extended-mentions-via-activitypub/355602/1 "2025-03-04T08:55:10Z")

</div>

我希望能够提及 fediverse 中的用户，尤其是在其他 Discourse 实例上，使用扩展的 fediverse 提及方案：@toka@memlab.thomaskalka.de

我期望这会在另一端触发通知。

我也很乐意讨论如何处理类别和标签 actor 的提及。

---

<div class="post-metadata">

### Author: ![aschrijver1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aschrijver1/32/492314_2.png) [@aschrijver1](https://meta.discourse.org/u/aschrijver1)
#### Post date: [2025年三月4日 21:48 UTC](https://meta.discourse.org/t/extended-mentions-via-activitypub/355602/2 "2025-03-04T21:48:28Z")

</div>

测试提及 @toka 来自 [https://socialhub.activitypub.rocks/t/extended-mentions-via-activitypub/5091](https://socialhub.activitypub.rocks/t/extended-mentions-via-activitypub/5091)。

结果：在 [meta.discourse.org](http://meta.discourse.org) 上尚未产生正确的提及。

---

<div class="post-metadata">

### Author: ![toka](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toka/32/492318_2.png) [@toka](https://meta.discourse.org/u/toka)
#### Post date: [2025年三月4日 21:53 UTC](https://meta.discourse.org/t/extended-mentions-via-activitypub/355602/3 "2025-03-04T21:53:52Z")

</div>

嗯。我本以为会在这里提及你，使用 @aschrijver。这在你上次发帖时奏效了。我本以为会在 meta 上提及你，使用 @aschriejver@meta.discourse.org

发布/同步评论到 activitypub 时可以要求做的一件事是：将本地提及转换为另一端的完全限定提及。

---

<div class="post-metadata">

### Author: ![thoka](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thoka/32/115652_2.png) [@thoka](https://meta.discourse.org/u/thoka)
#### Post date: [2025年三月4日 22:04 UTC](https://meta.discourse.org/t/extended-mentions-via-activitypub/355602/4 "2025-03-04T22:04:46Z")

</div>

来自 meta：嗯。想知道为什么 activitypub 会在 meta 创建用户，而他们的评论却来自一个联合站点。

我希望 activitypub 插件能创建具有完整 Fediverse 主地址的代理用户。对于我正在回复的帐户，这应该是 `https://meta.discourse.org/u/@toka@socialhub.activitypub.rocks` 而不是 `https://meta.discourse.org/u/toka`。（@angus）

---

<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: [2025年三月5日 08:14 UTC](https://meta.discourse.org/t/extended-mentions-via-activitypub/355602/5 "2025-03-05T08:14:31Z")

</div>

> [@thoka](#):
>
> 想知道为什么 activitypub 在其评论来自联合站点时，会在此处（元）创建用户。  
> …  
> 我希望 activitypub 插件能创建具有完整 Fediverse 主地址的代理用户。

这是发生的情况。

1. 从远程源接收活动。
2. 我们将活动、参与者和对象分别存储在数据库（“AP 对象”）中。
3. AP 对象与其等效的 Discourse 对象相关联，例如参与者获得用户。

在 ActivityPub 协议中，参与者的真实“完整 Fediverse 主地址”是其 `id`。这在步骤 `2` 中存储，完全按照从远程源接收的方式。它通常看起来不像 `@toka@socialhub.activitypub.rocks`。这种寻址约定，即 `username@domain.com`，源自 Fediverse 中 Webfinger 的使用，虽然我们支持并使用 Webfinger，但它本身并不是 ActivityPub 协议的一部分。

简而言之，我们很可能在中期添加对您期望的提及方式的支持。在该集成中将有许多问题和边缘情况需要解决。Discourse 提及是一项丰富且特定于 Discourse 的功能，与您在 Mastodon 中习惯的提及方式有些不同。尽管如此，我相信我们能找到一种方法使它们正常工作。请在那方面保持耐心。

---

<div class="post-metadata">

### Author: ![thoka](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thoka/32/115652_2.png) [@thoka](https://meta.discourse.org/u/thoka)
#### Post date: [2025年三月5日 08:32 UTC](https://meta.discourse.org/t/extended-mentions-via-activitypub/355602/6 "2025-03-05T08:32:34Z")

</div>

谢谢。想知道当前的实现是否会在元（此处对话中的 toka 和 aschrijver1）中“吞噬”用户名，或者这只是一个显示伪影。

---

<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: [2025年三月5日 08:47 UTC](https://meta.discourse.org/t/extended-mentions-via-activitypub/355602/7 "2025-03-05T08:47:39Z")

</div>

目前，fediverse 提及将不起任何作用。它们目前只是帖子内容的一部分文本字符串。
