diff options
author | Sandy Rogers <s@ndyroge.rs> | 2018-02-02 12:05:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-02 12:05:02 +0000 |
commit | e8b1e1fee49dcfac22f2519927ad29373d3093c7 (patch) | |
tree | 0bbce87f8a56947bd430b5634bb045ef71a1be14 | |
parent | 2d4c94c58ff9e3d11b307283a99e9144cbc9c829 (diff) | |
download | wee-slack-e8b1e1fee49dcfac22f2519927ad29373d3093c7.tar.gz |
Use self.team throughtout SlackThreadChannel class
-rw-r--r-- | wee_slack.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/wee_slack.py b/wee_slack.py index cc93314..7da0563 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1757,7 +1757,7 @@ class SlackThreadChannel(object): self.got_history = False self.label = None self.members = self.parent_message.channel.members - self.team = self.parent_message.channel.team + self.team = self.parent_message.team # self.set_name(self.slack_name) # def set_name(self, slack_name): # self.name = "#" + slack_name @@ -1818,10 +1818,10 @@ class SlackThreadChannel(object): def send_message(self, message): # team = self.eventrouter.teams[self.team] - message = linkify_text(message, self.parent_message.team, self) + message = linkify_text(message, self.team, self) dbg(message) - request = {"type": "message", "channel": self.parent_message.channel.identifier, "text": message, "_team": self.parent_message.team.team_hash, "user": self.parent_message.team.myidentifier, "thread_ts": str(self.parent_message.ts)} - self.parent_message.team.send_to_websocket(request) + request = {"type": "message", "channel": self.parent_message.channel.identifier, "text": message, "_team": self.team.team_hash, "user": self.team.myidentifier, "thread_ts": str(self.parent_message.ts)} + self.team.send_to_websocket(request) self.mark_read(update_remote=False, force=True) def open(self, update_remote=True): @@ -1850,7 +1850,7 @@ class SlackThreadChannel(object): self.channel_buffer = w.buffer_new(self.formatted_name(style="long_default"), "buffer_input_callback", "EVENTROUTER", "", "") self.eventrouter.weechat_controller.register_buffer(self.channel_buffer, self) w.buffer_set(self.channel_buffer, "localvar_set_type", 'channel') - w.buffer_set(self.channel_buffer, "localvar_set_nick", self.parent_message.team.nick) + w.buffer_set(self.channel_buffer, "localvar_set_nick", self.team.nick) w.buffer_set(self.channel_buffer, "localvar_set_channel", self.formatted_name()) w.buffer_set(self.channel_buffer, "short_name", self.formatted_name(style="sidebar", enable_color=True)) time_format = w.config_string(w.config_get("weechat.look.buffer_time_format")) |