Archived
1
0
Fork 0

Handle Twitter duplicates (#20)

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>
This commit is contained in:
Julien Riou 2021-04-15 15:13:00 +02:00
commit 1f5cef17d2
No known key found for this signature in database
GPG key ID: FF42D23B580C89F7
6 changed files with 163 additions and 31 deletions

View file

@ -164,6 +164,7 @@ Options:
* `access_token_secret`: authentication token secret generated for your Twitter account
* `hashtags`: list of key/value used to append hashtags to each tweet. Key is the pattern to match in the product name, value is the string to append to the tweet. For example, `{"twitter": {"hashtags": [{"rtx 3090": "#nvidia #rtx3090"}]}}` will detect `rtx 3090` to append `#nvidia #rtx3090` at the end of the tweet.
* `enable_replies`: reply to original message when product is not available anymore
* `retention`: number of days to keep tweet references in the database (not deleted by default)
* `telegram` (optional):
* `channel_name`: send message to a channel (ex: `@channel`)
* `chat_id`: send message to a chat (ex: `1234`)