tdlib / telegram-bot-api

Telegram Bot API server
https://core.telegram.org/bots
Boost Software License 1.0
3.11k stars 593 forks source link

Reactions order in MessageReactionUpdated is not preserved? #604

Closed wkpn closed 2 months ago

wkpn commented 3 months ago

1-1 chat with the bot, steps are:

  1. put one non-premium reaction (🐳 in the example)
  2. put second non-premium reaction (🤡 in the example)
  3. put third premium reaction (numbers in the example)
  4. remove premium reaction

Expected: order is preserved at all steps Actual: it is not:

image

second setup, this time non-premium reactions only

  1. put 🐳
  2. put 👀
  3. put 🤡 - order in old_reaction is not preserved already (swapped)
  4. given ['🐳', '👀', '🤡'] as a current reactions set, remove the middle one (👀) - order is not preserved again

Expected: order is preserved at all steps Actual: it is not:

image
levlam commented 3 months ago

Reaction order depends on the number of times the reactions were chosen by other users. Therefore there can be no any order on reactions of other users and it doesn't make sense to pretend that there is any order on reactions of the current user.

wkpn commented 3 months ago

so, to summarize: in 1-1 chats there is no way to tell which reaction was set earlier/later, right?

levlam commented 3 months ago

Yes, this is not possible to know in any chat with more than 1 user, including private chats.