diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2020-04-18 14:43:07 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2020-05-30 21:11:27 +0200 |
commit | b3d453362ae698ca06dc2a964cee9d394a7a932d (patch) | |
tree | 13c69449ea1aa572249672a2dccd869788aaa167 /wee_slack.py | |
parent | 3e8f96f6ca004be3f006d36d83f0430683b7eb76 (diff) | |
download | wee-slack-b3d453362ae698ca06dc2a964cee9d394a7a932d.tar.gz |
Remove team parameter from store_message
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/wee_slack.py b/wee_slack.py index 8c84b54..5e6c2dd 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1904,11 +1904,11 @@ class SlackChannel(SlackChannelCommon): request.update(request_dict_ext) self.team.send_to_websocket(request) - def store_message(self, message, team, from_me=False): + def store_message(self, message, from_me=False): if not self.active: return if from_me: - message.message_json["user"] = team.myidentifier + message.message_json["user"] = self.team.myidentifier self.messages[SlackTS(message.ts)] = message sorted_messages = sorted(self.messages.items()) @@ -2993,7 +2993,7 @@ def process_message(message_json, eventrouter, team, channel, metadata, history_ subtype_functions[subtype](message_json, eventrouter, team, channel, history_message) else: message = SlackMessage(message_json, team, channel) - channel.store_message(message, team) + channel.store_message(message) text = channel.render(message) dbg("Rendered message: %s" % text) @@ -3060,7 +3060,7 @@ def subprocess_thread_message(message_json, eventrouter, team, channel, history_ parent_message, message_json, team, channel) parent_message.submessages.append(message) channel.hash_message(parent_ts) - channel.store_message(message, team) + channel.store_message(message) channel.change_message(parent_ts) if parent_message.thread_channel and parent_message.thread_channel.active: @@ -3090,7 +3090,7 @@ def subprocess_channel_join(message_json, eventrouter, team, channel, history_me message = SlackMessage(message_json, team, channel, override_sender=prefix_join) channel.buffer_prnt(prefix_join, channel.render(message), message_json["ts"], tagset='join', tag_nick=message.get_sender()[1], history_message=history_message) channel.user_joined(message_json['user']) - channel.store_message(message, team) + channel.store_message(message) def subprocess_channel_leave(message_json, eventrouter, team, channel, history_message): @@ -3098,7 +3098,7 @@ def subprocess_channel_leave(message_json, eventrouter, team, channel, history_m message = SlackMessage(message_json, team, channel, override_sender=prefix_leave) channel.buffer_prnt(prefix_leave, channel.render(message), message_json["ts"], tagset='leave', tag_nick=message.get_sender()[1], history_message=history_message) channel.user_left(message_json['user']) - channel.store_message(message, team) + channel.store_message(message) def subprocess_channel_topic(message_json, eventrouter, team, channel, history_message): @@ -3106,7 +3106,7 @@ def subprocess_channel_topic(message_json, eventrouter, team, channel, history_m message = SlackMessage(message_json, team, channel, override_sender=prefix_topic) channel.buffer_prnt(prefix_topic, channel.render(message), message_json["ts"], tagset="topic", tag_nick=message.get_sender()[1], history_message=history_message) channel.set_topic(message_json["topic"]) - channel.store_message(message, team) + channel.store_message(message) subprocess_group_join = subprocess_channel_join |