# 使用ActivityPub插件

**URL:** <https://meta.discourse.org/t/working-with-the-activitypub-plugin/273437>\
**Category:** Development\
**Tags:** activitypub\
**Created:** [2023年七月30日 12:43 UTC](https://meta.discourse.org/t/working-with-the-activitypub-plugin/273437 "2023-07-30T12:43:05Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![mcdanlj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcdanlj/32/131829_2.png) [@mcdanlj](https://meta.discourse.org/u/mcdanlj)\
**Post date:** [2023年七月29日 18:59 UTC](https://meta.discourse.org/t/working-with-the-activitypub-plugin/273437/7 "2023-07-29T18:59:44Z")

</div>

我对 Note 和 Article 的格式和呈现方式的意图感到好奇。

## Note

对于 Note，当我从 Mastodon Glitch 发布到 vanilla Mastodon 并使用 markdown 时，它在 Glitch 中显示为富文本，而在 vanilla Mastodon 中显示为纯文本，markdown 被剥离。

在启用了 Markdown 的 Mastodon Glitch 中编写此内容：

 ![Screenshot from 2023-07-29 14-42-25](https://global.discourse-cdn.com/meta/original/4X/1/9/2/19240b237a539593a650b260396011156556e763.png)

…在 Mastodon Glitch 中显示为：

 ![Screenshot from 2023-07-29 14-43-30](https://global.discourse-cdn.com/meta/original/4X/7/6/a/76a61e14a618e6b561f6afd3b4bbe3ea4d71e5ff.png)

…在 vanilla Mastodon 中显示为：

 ![Screenshot from 2023-07-29 14-43-01](https://global.discourse-cdn.com/meta/original/4X/b/b/f/bbfa55aa2a1bed575ea90c6681bc264467b6fd77.png)

但是，如果我在 Discourse 中使用 Note 以富文本方式撰写：

 ![image](https://global.discourse-cdn.com/meta/original/4X/3/3/a/33a6824fc4eb9192cc1d96ca8c6936513784288f.png)

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

…在 Mastodon Glitch 中得到：

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/5/d/75d5ca2ded36742864943998de57c9ace7db027b.png)

…在 vanilla Mastodon 中得到：

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

…看起来几乎一样。

当我在 [https://elk.zone](https://elk.zone) 网页客户端上使用该帖子时，它确实包含了一些换行符，但 markdown 字体格式仍然被删除了：

 ![image](https://global.discourse-cdn.com/meta/original/4X/9/f/e/9fe5fb3061a7ba38164bc59fab150ddb1d9ff7d0.png)

大多数 fediverse 实际上可以处理 markdown，因此让它能够跨平台传输会很好。

另外，我注意到标签在 Mastodon 中没有作为标签出现。

## Article

对于发布 Article，您期望在 Mastodon 中显示什么？

我在 PR 21 上看到的是 URL 和一个小的 onebox，文本不多。

 ![image](https://global.discourse-cdn.com/meta/original/4X/3/2/e/32eb9f0bd02e73bb996eda246766423486cc24e0.png)

我不知道这在多大程度上是 Mastodon 的问题；我还没有设置例如 Firefish 实例来比较。

---

_[View the full topic](https://meta.discourse.org/t/working-with-the-activitypub-plugin/273437)._
