ShortcutsPreview
ShortcutsPreview copied to clipboard
Prevent duplicate previews on Reddit
~~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.
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.
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.
I'm against a database in ShortcutsPreview itself, but if it's needed we can make a Snoostream/Snoostorm alternative.
@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 Are there method(s) in the reddit API wrapper to check for that?
@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 can we please close this?