ubports / telegram-app

Unofficial Telegram App for Ubuntu Desktop & Mobile
GNU General Public License v3.0
55 stars 23 forks source link

Forwarding a selection of messages gets send in an opposite order #177

Closed zubozrout closed 6 years ago

zubozrout commented 6 years ago

Hello, if I select multiple messages and forward them to a different chat those get send in a wrong order starting from the newest and getting to the oldest messages.

If I do the same on web/desktop/Android the original message order is preserved.

I don't think Telegram for Ubuntu Touch ever behaved differently but I believe this is a bug.

Steps to reproduce:

  1. Hold a finger on any message until a selection checkboxes appear.
  2. Select multiple messages.
  3. Click the top right menu and hit forward.
  4. Select a chat to forward the messages to.
  5. Check the order of messages sent and you'll see it doesn't match the original order but rather is being displayed in an opposite order. (Note there still may be some other issue with Telegram displaying it even in a different order at first time but if you restart Telegram or check it out on another device you'll find the outcome is always the opposite order.)

Expected behaviour:

Messages get send in the same order they are listed in the original thread.

Current behaviour:

Messages get send in the opposite order to what they are listed in the original thread.

My Telegram version: 2.5.3.2 My Ubuntu version: Ubuntu 16.04 r85 My device: Meizu MX4 (arale)

Flohack74 commented 6 years ago

Hmm strange there is a sort command inside to exactly prevent this problem: https://github.com/ubports/TelegramQML/blob/cad3dea40b34b20858cbdfa6bb010eee9b25415a/telegramqml.cpp#L1904 - So basically this should not happen. Except Telegram servers expect the messages in opposite order. I will try to change it to a normal sort. Are you available for testing this?

zubozrout commented 6 years ago

@Flohack74 Of course, I am :). And so far this works for me in the new texting version of Telegram. So it seems this is fixed now, thank you :). But in case I bump into this issue again in the future I'll post it here.