diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2020-04-22 17:24:07 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2020-05-30 21:13:20 +0200 |
commit | ecf450bbfa753c76d4f682f99b87dc0ce3be51bb (patch) | |
tree | c7cdd8ce86e1d3c245a6b13b6998257b3099edfc | |
parent | 101ba86896ab7179964cd44a8a10ac03a2a02e86 (diff) | |
download | wee-slack-ecf450bbfa753c76d4f682f99b87dc0ce3be51bb.tar.gz |
Sort submessages after appending to it
I don't think we ever receive thread messages out of order, so this
probably isn't strictly necessary, but it is a bit safer just in case.
-rw-r--r-- | wee_slack.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py index 33c7ae0..3f39744 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -3169,6 +3169,7 @@ def subprocess_thread_message(message_json, eventrouter, team, channel, history_ message = SlackThreadMessage(parent_message, message_json, team, channel) if message.ts not in parent_message.submessages: parent_message.submessages.append(message.ts) + parent_message.submessages.sort() channel.hash_message(parent_ts) channel.change_message(parent_ts) |