# 为RSS插件添加禁用作者更新选项

**URL:** <https://meta.discourse.org/t/add-option-to-disable-author-update-on-rss-plugin/238884>\
**Category:** Feature\
**Tags:** pr-welcome, rss-polling\
**Created:** [2022 年9 月 13 日 12:31 UTC](https://meta.discourse.org/t/add-option-to-disable-author-update-on-rss-plugin/238884 "2022-09-13T12:31:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

作者： ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
发布日期： [2022 年9 月 13 日 15:42 UTC](https://meta.discourse.org/t/add-option-to-disable-author-update-on-rss-plugin/238884/2 "2022-09-13T15:42:28Z")

</div>

> [@icaria36](#):
>
> 如果您更改导入帖子的所有权，当 RSS feed 刷新后，插件会将其改回默认用户

是的，这是 Discourse 核心自 2018 年以来一直实施的行为：

> <https://github.com/discourse/discourse/pull/5771>
>
> We ran into a problem where \`PollFeed\` job didn't update the post author with th…e one found in the RSS feed.
> 
> Then I found out \`TopicEmbed.import\` only updates the post body and neglects new title or author, when a post with the same \`embed\_url\` already exists.
> 
> \---
> 
> Consider the scenario:
> 
> 1. A blog page with Discourse embedded comment hits \`embed\_controller#comments\`
> 2. The topic doesn't exist yet, so it tries to fetch the content from RSS feed, but it didn't because feed polling is rate limited
> 4. It then crawls the webpage and creates a topic with \[the default \`embed\_by\_username\`\](https://github.com/discourse/discourse/blob/ab80986184a498f68d99541c63558ea2089f49d3/lib/topic\_retriever.rb#L48)
> 5. \`PollFeed\` is schedule to run at a later time, and it fetches the title, content, and author from the RSS feed with \[\`embed\_username\_key\_from\_feed\`\](https://github.com/discourse/discourse/blob/ab80986184a498f68d99541c63558ea2089f49d3/app/jobs/scheduled/poll\_feed.rb#L156).
> 6. The post should be updated with the title, content and author from the feed.
> 
> \---
> 
> Let me know what you think, cheers! 💪

已将此对话移至新主题，并将其设为 #pr-welcome，以便插件级别设置可以禁用作者更新。想要处理此问题的人可能需要在 `TopicEmbed.import` 中添加一个新参数，然后在插件中使用它。

---

_[View the full topic](https://meta.discourse.org/t/add-option-to-disable-author-update-on-rss-plugin/238884)._
