Skip to content

URL: Do not send "OLD!" messages whenever the URL was shared recently#22

Open
nightmared wants to merge 1 commit intopipoteam:masterfrom
nightmared:url-recent-links
Open

URL: Do not send "OLD!" messages whenever the URL was shared recently#22
nightmared wants to merge 1 commit intopipoteam:masterfrom
nightmared:url-recent-links

Conversation

@nightmared
Copy link
Copy Markdown

@nightmared nightmared commented Sep 16, 2018

This tiny commit prevent pipobot from displaying "OLD!" messages multiples times in a row when the link in question was shared less than 24h ago.
My only issue concerning this (rather minor) change is that I'm unsure whether the database will be upgraded automatically or if it requires manual intervention (as I've changed the database format of the URL module by adding a column).


EDIT: fixed a typo

@mcarton
Copy link
Copy Markdown
Contributor

mcarton commented Sep 16, 2018

The whole point of that module is that if someone posts a news article on the same day as somebody else, pipobot (gently) tells you about it.
You should reduce that time to something like 1min or ignore messages starting with > if your goal is to keep pipo quite when quoting.

@nightmared
Copy link
Copy Markdown
Author

Right, this should be fixed. As for ignoring messages starting with '>', that is doable but I doubt of its interest as there is no standard way of quoting messages.

@sleduc
Copy link
Copy Markdown
Member

sleduc commented Sep 16, 2018

I guess the delay could be set as a parameter in the configuration file, with 0 as default if none is provided. This way the default behavior will not be changed, and you will be able to easily change the delay to the value you want.

Regarding the update of the database I am not sure, the simplest way would be to test it, but I guess a manual operation would be required to add the column in existing databases.

@nightmared nightmared force-pushed the url-recent-links branch 2 times, most recently from 17ce33d to 17af056 Compare October 6, 2018 06:58
@nightmared
Copy link
Copy Markdown
Author

As suggested (a long time ago, sorry !), I have added an option to select the time between two submissions (it defaults for now to a mintue). It also doesn't prompt any message if the page had a different title when it was last posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants