LibertyPaul / LostFilmUpdatesBot

A Telegram bot that notifies about new episodes released at https://lostfilm.tv
GNU General Public License v3.0
10 stars 2 forks source link

Log outgoing Telegram message id #128

Open LibertyPaul opened 4 years ago

LibertyPaul commented 4 years ago

Telegram API does not return an unique update_id, only message_id is present. The message_id is unique per chat, therefore cannot be used as a unique key constraint in messagesHistory. Need to rework the unique constraint to store & validate new records neatly.

A proof of concept could be storing the message_id having it unique in pair with user_id. Alternatively a string of chat_id-message_id can be used.