klothoplatform / slack-notifier

Slack notification bot
MIT License
3 stars 0 forks source link

update top-level messages before repying to them #49

Closed ghost closed 1 year ago

ghost commented 1 year ago

Updating the thread after the message has been fully updated signals to slack that it should update the thread in the main chat; otherwise, clients cache it.

This resolves #41

ghost commented 1 year ago

Was the promise.all not working as expected or did the awaits need to occur because the latter lines ran

The latter. This seems to be a Slack bug: if you update the message via a bot, it doesn't show up as updated until someone interacts with the thread. It doesn't matter who interacts or what the interaction is (even just opening it in a side panel works), but it has to be something. So, this PR just makes sure that the reply to the thread always happens after the message update, so that it counts as that interaction.