maubot / rss

A RSS plugin for maubot
GNU Affero General Public License v3.0
69 stars 21 forks source link

$feed_title in posts does not match content of title field in feed database #49

Open tux93 opened 1 year ago

tux93 commented 1 year ago

My use case is the following: I have subscribed to a feed but want to customize the title shown when new posts are sent.

To do this I tried to modify the 'title' field in the 'feed' database, but new posts are still sent with the title that was set when subscribing, my notification_template looks like this: New post from $feed_title:<br/>$link

tulir commented 1 year ago

The title is probably always the real feed title, not the one in the database. You can just type a custom title in the template itself rather than using the variable

tux93 commented 1 year ago

You can just type a custom title in the template itself rather than using the variable

True, but is the expectation that the variable matches the database unreasonable?

tulir commented 1 year ago

Yes, the database is just a cache used for !rss subscriptions and other cases where the bot doesn't re-fetch the feed. When broadcasting new entries, the bot has just re-fetched the feed, so it has the latest feed info and has no reason to use cached data.

It should probably also update the database if it doesn't match though 🤔