# 将 Discourse 主题作者设置为帖子作者？

**URL:** https://meta.discourse.org/t/setting-the-discourse-topic-author-to-the-post-author/284814
**Category:** Feature
**Tags:** rss-polling
**Created:** [2020年八月19日 23:03 UTC](https://meta.discourse.org/t/setting-the-discourse-topic-author-to-the-post-author/284814 "2020-08-19T23:03:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![a\_lee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/a_lee/32/134326_2.png) [@a\_lee](https://meta.discourse.org/u/a_lee)
#### Post date: [2020年八月19日 23:03 UTC](https://meta.discourse.org/t/setting-the-discourse-topic-author-to-the-post-author/284814/1 "2020-08-19T23:03:55Z")

</div>

有没有办法将 Discourse 话题作者设置为帖子作者？我似乎记得有一种方法可以从 RSS 中获取用户名，但我现在找不到该设置（是 discourse embed feed key 之类的吗？）。我们使用 SSO 登录，希望正确设置话题作者，以便回复能通知原始作者。

我们正尝试使用该插件，以解决自 2020 年 2 月之后开始遇到的嵌入错误。更多详情见 [Embedding error - #5 by a\_lee](https://meta.discourse.org/t/embedding-error/135153/5?u=a_lee%E3%80%82)

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [2020年八月20日 23:09 UTC](https://meta.discourse.org/t/setting-the-discourse-topic-author-to-the-post-author/284814/2 "2020-08-20T23:09:28Z")

</div>

> [@a\_lee](#):
>
> 我好像记得有一种方法可以从 RSS 中提取用户名，但我没再看到这个设置了。

我依稀记得以前确实可以从源中提取主题作者。不过，RSS 轮询插件中并没有这个功能。我不确定让该插件尝试从源中提取创建者并将其与现有的 Discourse 用户进行匹配需要多少工作量。

---

<div class="post-metadata">

### Author: ![a\_lee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/a_lee/32/134326_2.png) [@a\_lee](https://meta.discourse.org/u/a_lee)
#### Post date: [2020年八月26日 07:26 UTC](https://meta.discourse.org/t/setting-the-discourse-topic-author-to-the-post-author/284814/3 "2020-08-26T07:26:27Z")

</div>

看起来 `embed_username_key_from_feed` SiteSetting 在此处已被移除：[FEATURE: Replace SimpleRSS with Ruby RSS module (#5311) · discourse/discourse@5f318a5 · GitHub](https://github.com/discourse/discourse/commit/5f318a5241c5b641b69ef05e3494ebb281876603)

我可以尝试向该插件提交拉取请求，将其作为插件设置重新添加，但可能需要一点指导 😅

看起来大部分工作将集中在 [feed\_item.rb](https://github.com/discourse/discourse-rss-polling/blob/master/app/models/discourse_rss_polling/feed_item.rb) 和 [poll\_feed.rb](https://github.com/discourse/discourse-rss-polling/blob/master/app/jobs/jobs/discourse_rss_polling/poll_feed.rb) 中，同时还需要在 [feed\_setting.rb](https://github.com/discourse/discourse-rss-polling/blob/master/app/models/discourse_rss_polling/feed_setting.rb) 中添加该设置。
