status-im / status-desktop

Status Desktop client made in Nim & QML
https://status.app
Mozilla Public License 2.0
276 stars 75 forks source link

The order of messages in Discord from the Bridge is sometimes wrong #14021

Open jrainville opened 4 months ago

jrainville commented 4 months ago

Bug Report

Description

I was sending messages from Status and then checked what it looked like on Discord, and the order was completely wrong.

I wonder if maybe we don't use the received timestamp instead of the sent timestamp? Or maybe Discord doesn't support a timestamp?

Steps to reproduce

Send a couple of messages on Status and see what it looks like on Discord. The order might be wrong

Expected behavior

Messages are in the same order on Status and Discord

Actual behavior

Wrong order on Discord

See screenshot. The messages appeared in complete reverse order Screenshot from 2024-03-18 14-42-45

Additional Information

endulab commented 4 months ago

This is really strange.

I checked the API and it seemed that Webhook API does not have any timestamps or clocks. Here's a reference: https://discord.com/developers/docs/resources/webhook#execute-webhook-jsonform-params. If the messages received by the bridge are in wrong order they are pushed to Discord in wrong order.

Possible solution (from the top of my head):

Also I see that these messages are long. What was the sending time interval? Did they show up on Discord instantly? @jrainville ?

I know that @jakubgs restarted the app at ~19:00CET. Maybe these messages were taken from history and they were in the wrong order.

jakubgs commented 4 months ago

It is very likely this was due to the high load event that forced a restart, for more details see:

jrainville commented 4 months ago

Also I see that these messages are long. What was the sending time interval? Did they show up on Discord instantly? @jrainville ?

I sent the messages with a few seconds in between. It was one after the other without any big pause, except to type the new message

I don't know if they appeared instantly sadly. I checked a few minutes later and saw them in the wrong order (My Discord is muted).

It is very likely this was due to the high load event that forced a restart, for more details see:

Ok, then it's possible just that. I'll keep this issue opened for now in case it happens again. I'll try to log more cases if I see it