# RSSポーリング：プラグインの拡張ポイント（フィードフォームの出力先、インポート時のフィードID、更新パスのフック）

**URL:** <https://meta.discourse.org/t/rss-polling-extension-points-for-plugins-feed-form-outlet-feed-id-in-import-update-path-hook/413282>\
**Category:** Feature\
**Tags:** rss-polling\
**Created:** [2026 年 9 月 24 日午後 9:07 UTC](https://meta.discourse.org/t/rss-polling-extension-points-for-plugins-feed-form-outlet-feed-id-in-import-update-path-hook/413282 "2026-09-24T21:07:15Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Sailor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sailor/32/579029_2.png) [@Sailor](https://meta.discourse.org/u/Sailor)\
**Post date:** [2026 年 9 月 24 日午後 9:07 UTC](https://meta.discourse.org/t/rss-polling-extension-points-for-plugins-feed-form-outlet-feed-id-in-import-update-path-hook/413282/1 "2026-09-24T21:07:15Z")

</div>

RSS Polling 用の小さな companion プラグイン（[discourse-rss-onebox](https://github.com/Peter-Petrik/discourse-rss-onebox)）を構築しました。インポートされたブログ記事は記事の onebox としてレンダリングされ、オプションとしてフィードの概要、YouTube の説明、タイトルフォーマットをサポートしています。3 つのギャップにより、ドキュメント化されたフックを使用する代わりに、コアメソッドをラップする必要がありました。

1. **フィードフォームにプラグインアウトレットがない。** [rss-polling-feed-form.gjs#L287-L351](https://github.com/discourse/discourse/blob/6ba633dbf56576959ff3d578048ca9698de153ff/plugins/discourse-rss-polling/admin/assets/javascripts/discourse/components/rss-polling-feed-form.gjs#L287-L351) には `PluginOutlet` が存在せず、更新コントラクトは固定の属性セットのみを受け入れます（[update.rb#L9-L14](https://github.com/discourse/discourse/blob/6ba633dbf56576959ff3d578048ca9698de153ff/plugins/discourse-rss-polling/app/services/discourse_rss_polling/rss_feed/update.rb#L9-L14)）。プラグインはフィードごとのオプションを追加できないため、私たちのプラグインには別の管理ページが必要でした。アウトレットと、追加フィールドを永続化する方法（例えばフィードのカスタムフィールド）があれば、これをカバーできます。

2. **フィード ID がインポートに到達しない。** ポールジョブは `rss_feed_id` を知っていますが、`TopicEmbed.import`（[poll\_feed.rb#L110](https://github.com/discourse/discourse/blob/6ba633dbf56576959ff3d578048ca9698de153ff/plugins/discourse-rss-polling/app/jobs/jobs/discourse_rss_polling/poll_feed.rb#L110)）や `topic_embed_import_create_args` モディファイア（[topic\_embed.rb#L108](https://github.com/discourse/discourse/blob/6ba633dbf56576959ff3d578048ca9698de153ff/app/models/topic_embed.rb#L108)）はこれを決して受け取りません。私たちはポールジョブをラップしてこれをキャプチャしています。オプションとしてこれをパスできれば、プラグインはフィードごとにアクションを取れます。

3. **更新パスにフックがない。** フィードアイテムの内容が変更されると、`TopicEmbed.import` はフィードの内容で投稿を改訂します（[topic\_embed.rb#L147-L152](https://github.com/discourse/discourse/blob/6ba633dbf56576959ff3d578048ca9698de153ff/app/models/topic_embed.rb#L147-L152)）。これにより、create モディファイアが何をしたかをバイパスします。ブロガーが投稿を編集すると、プラグインによって整形されたトピックが静かにフィードテキストに戻ってしまいます。`topic_embed_import_create_args` を模した更新変更用のモディファイアがあれば、これを解消できます。

2 と 3 のワークアラウンドは、`TopicEmbed.import` とポールジョブを prepend することです。これは脆いものです：`main` はその後 `TopicEmbed.import` に `truncate:` キーワードを追加しており、2026.7 のシグネチャを模したラッパーを壊します。私たちはそれをパスするためにリリースを出す必要がありました。ドキュメント化されたフックがあれば、その種の破壊を避けることができます。

---

_[View the full topic](https://meta.discourse.org/t/rss-polling-extension-points-for-plugins-feed-form-outlet-feed-id-in-import-update-path-hook/413282)._
