ShortcutsPreview icon indicating copy to clipboard operation
ShortcutsPreview copied to clipboard

Prevent duplicate previews on Reddit

Open haykam821 opened this issue 6 years ago • 7 comments

~~Sometimes, the current library for an event per submission to a subreddit in this project is Snoostorm. However, sometimes it ends up in duplicate posts. We should switch to Snoostream to prevent handling the same post twice and ending up in duplicate previews.~~

That has been tried, and ended up in a crash every time there was a new post, leading to it being reverted in c107add00367961c45e1034bd59989d509986f95. We need to figure out another way.

haykam821 avatar Sep 22 '18 17:09 haykam821

Reopened because the closing change has been reverted (c107add00367961c45e1034bd59989d509986f95) because Snoostream crashes all the time. We'll need to find another way to prevent duplicates.

haykam821 avatar Sep 23 '18 14:09 haykam821

Would it not be best to link a DB on the bot side to keep track of where it's posted a reply? That would seem like the best way to prevent duplicates in my opinion.

Hacksore avatar Sep 28 '18 12:09 Hacksore

I'm against a database in ShortcutsPreview itself, but if it's needed we can make a Snoostream/Snoostorm alternative.

haykam821 avatar Sep 28 '18 12:09 haykam821

@Hacksore Would you be interested in doing the above? As a temporary fix, we can check for a stickied comment by the authenticated account, but that'd mean sticky privileges would be required.

haykam821 avatar Oct 01 '18 14:10 haykam821

@haykam821 Are there method(s) in the reddit API wrapper to check for that?

Hacksore avatar Oct 01 '18 14:10 Hacksore

@Hacksore Probably, but a far simpler solution that I have been made aware of is to save the post and ignore it if it has been saved.

haykam821 avatar Jun 19 '19 20:06 haykam821

@haykam821 can we please close this?

Hacksore avatar Jun 17 '23 17:06 Hacksore