Skip to content

Commit

Permalink
Merge pull request #27 from nalbam/main
Browse files Browse the repository at this point in the history
Refactor chat_update function to improve performance and add delay be…
  • Loading branch information
nalbam authored Sep 5, 2024
2 parents 83e0a2a + 705ddd5 commit 39554c9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ def chat_update(say, channel, thread_ts, latest_ts, message="", continue_thread=
# Update the message
app.client.chat_update(channel=channel, ts=latest_ts, text=text)
else:
time.sleep(0.3)

# New message
result = say(text=text, thread_ts=thread_ts)
latest_ts = result["ts"]
Expand Down

0 comments on commit 39554c9

Please sign in to comment.