Falco
(Falco)
13. September 2022 um 15:42
2
Ja, das ist das Verhalten, das Discourse Core seit 2018 implementiert:
master ← xrav3nz:fix-topic-embed-import-should-update-user
opened 05:14AM - 19 Apr 18 UTC
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! 💪
Diese Konversation wurde in ein neues Thema verschoben und als pr-welcome markiert, um eine Plugin-Ebene-Einstellung hinzuzufügen, um die Autorenaktualisierung zu deaktivieren. Jemand, der daran arbeiten möchte, muss wahrscheinlich einen neuen Parameter zu TopicEmbed.import hinzufügen und ihn dann im Plugin verwenden.
4 „Gefällt mir“