You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The message cache does not have a stable order (I suspect it is simply
the order in which the messages were added to the cache). Thus, when
searching for the latest status message, sometimes a message other than
the latest was picked.
In practice, it seems like this only ever happened when the bot was
offline for a number of hours, which is why it hasn't come up in
production. But in development, it could be reproduced by:
- Leave the bot offline for a while (24h?)
- Start the bot
- Claim a channel
- The channel that is moved up from being dormant has the wrong message
edited, so the message at the bottom still says "dormant".
I suspect this is what the `.reverse()`, which was removed in commit
09ad491, was intended to solve (but it
caused bugs during normal operation). This should be a full fix.
I am not sure of the performance implications here. I think it should
not be too bad, because we are filtering to only messages from the bot,
before sorting.
0 commit comments