aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2020-05-14 01:03:47 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2020-05-30 21:13:21 +0200
commit63d39dc5f71dcbfd46c120d285a91fcf8cc4ef0d (patch)
tree99cea5b87a413a459f5af36783ed47eeacfc2ad0 /wee_slack.py
parent4210fa2e438644bfde1b0f2637076e473d46a9fe (diff)
downloadwee-slack-63d39dc5f71dcbfd46c120d285a91fcf8cc4ef0d.tar.gz
Use last_read for parent message when checking mentions notify
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 3b86750..a34d057 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -3272,10 +3272,11 @@ def subprocess_thread_message(message_json, eventrouter, team, channel, history_
if parent_message.thread_channel and parent_message.thread_channel.active:
if not history_message:
parent_message.thread_channel.prnt_message(message, history_message)
- elif message.ts > channel.last_read and message.has_mention():
- parent_message.notify_thread(action="mention", sender_id=message_json["user"])
- elif message.ts > parent_message.last_read and parent_message.subscribed:
- parent_message.notify_thread(action="subscribed", sender_id=message_json["user"])
+ elif message.ts > parent_message.last_read:
+ if message.has_mention():
+ parent_message.notify_thread(action="mention", sender_id=message_json["user"])
+ elif parent_message.subscribed:
+ parent_message.notify_thread(action="subscribed", sender_id=message_json["user"])
return message