Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot posts flood of old/historic items (limit not working) #1

Open
pReya opened this issue May 22, 2023 · 7 comments
Open

Bot posts flood of old/historic items (limit not working) #1

pReya opened this issue May 22, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@pReya
Copy link

pReya commented May 22, 2023

Some RSS Feeds are not well implemented, and contain a lot of historic items. It would be nice if there was an option to ignore "old" items, and only push items that are newer than the time of subscription.

This should be optional, so there needs to be a "switch" to enable this behavior. Probably within the !rss subscribe <feed URL> command. How about !rss subscribe ignoreOld <feed URL>?

If this is something you agree with, I'd be happy to provide a PR.

@turt2live
Copy link
Member

Sorry, I don't quite understand what behaviour you're seeing. Do you have an example/screenshots?

@pReya pReya changed the title Option to ignore old items and only post future items Feature request: Option to ignore old items and only post future items May 22, 2023
@pReya
Copy link
Author

pReya commented May 22, 2023

Sorry, I don't quite understand what behaviour you're seeing. Do you have an example/screenshots?

This is not a bug – sorry if this was unclear.

If I subscribe to a new feed, the bot will post all items that are part of the feed. Typically these are limited, by the creator of the feed, to contain X most recent items (something like 20 or 50 are common default values).

However some feeds contain ALL items without any limit (could be hundreds or thousands of items). Typically you don't want the bot to "spam" hundreds or thousands of messages into the channel at once. So I am suggesting a flag, which will ignore all "old" items and only post items that are newer than the time of subscription (it will not post all the existing historical items).

@turt2live
Copy link
Member

Ah, the initial setup should only be posting ~20 feed items at most, but tracking all of them in the database (so it doesn't post about them later).

I would classify this as a bug if it's posting more than 20 at the point of initial subscription. Ideally, that number would be configurable in the config.yaml, but not as a separate command/per-room option.

@turt2live turt2live added the bug Something isn't working label May 22, 2023
@pReya
Copy link
Author

pReya commented May 23, 2023

Ah, the initial setup should only be posting ~20 feed items at most, but tracking all of them in the database (so it doesn't post about them later).

Then there seems to be a bug indeed. I tested this yesterday, and had about 370 messages in my channel, before I was able to kick the bot from the room. Also I couldn't find any such limit in the code. Maybe you forgot it during the recent refactoring?

And yes, configuring this in config file seems to be a sensible way to do this.

@pReya pReya changed the title Feature request: Option to ignore old items and only post future items Bot posts flood of old/historic items (limit not working) May 23, 2023
@turt2live
Copy link
Member

"Recent refactoring" is kind of you :p

It was written from scratch in about a weekend - I very likely forgot to add such a limit and probably assumed I already did by the time I pushed the code live.

@ahlrodrigues
Copy link

Hi! Same news aboul Thais bug?

@turt2live
Copy link
Member

I unfortunately don't have the time to make it work, but if someone contributes a PR then happy to get it deployed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants