You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.
When a product is available, a notification is sent to Twitter. When the product is sold out, the reference in the database is deleted and, eventually, a reply to the original message is sent.
Sometimes, the very same product is available again. A new notification, with the same message content, is sent. But Twitter returns the following error:
failed to create new twitter thread: twitter: 187 Status is a duplicate.
I don't see a way to check if a status is a duplicate before sending a tweet on the Twitter API.
We should create a checksum of the status content, store it in the database with the twitter ID then verify the checksum before creating a new tweet. If the checksum is detected in the database, reply to the original tweet or the reply to continue the thread (unless enable_replies is set to false).
The text was updated successfully, but these errors were encountered:
This commit adds a hash attribute to help identify duplicate messages. Tweets
have a TweetID attribute for the initial thread identifier and a LastTweetID
attribute to keep track of the last reply to eventually continue the thread if a
duplicate is detected.
Signed-off-by: Julien Riou <julien@riou.xyz>
When a product is available, a notification is sent to Twitter. When the product is sold out, the reference in the database is deleted and, eventually, a reply to the original message is sent.
Sometimes, the very same product is available again. A new notification, with the same message content, is sent. But Twitter returns the following error:
I don't see a way to check if a status is a duplicate before sending a tweet on the Twitter API.
We should create a checksum of the status content, store it in the database with the twitter ID then verify the checksum before creating a new tweet. If the checksum is detected in the database, reply to the original tweet or the reply to continue the thread (unless
enable_replies
is set tofalse
).The text was updated successfully, but these errors were encountered: