aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTomas Janousek <tomi@nomi.cz>2019-01-15 18:01:12 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2019-01-26 11:30:58 +0100
commit6b78e94a4637c10644a0472159d7abe1dd7a0490 (patch)
treee36a3ff1e2222ccd03eee8b0346999c46094b242 /wee_slack.py
parent507b9618f93bc864fe4516f7acf7e846e90da6b5 (diff)
downloadwee-slack-6b78e94a4637c10644a0472159d7abe1dd7a0490.tar.gz
Resolve references in topic
When a user is mentioned in a topic, it's only resolved in the 15:47:34 <--> @someone set the channel topic: blah blah @mention blah message. The buffer title, however, reads: blah blah <@JHDJFHKDW> blah
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 35b33c1..2e94222 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1461,6 +1461,7 @@ class SlackChannel(SlackChannelCommon):
topic = self.topic['value']
if topic == "":
topic = self.slack_purpose['value']
+ topic = unhtmlescape(unfurl_refs(topic, ignore_alt_text=False))
w.buffer_set(self.channel_buffer, "title", topic)
def set_topic(self, value):
@@ -2726,7 +2727,7 @@ def subprocess_message_deleted(message_json, eventrouter, channel, team):
def subprocess_channel_topic(message_json, eventrouter, channel, team):
text = unhtmlescape(unfurl_refs(message_json["text"], ignore_alt_text=False))
channel.buffer_prnt(w.prefix("network").rstrip(), text, message_json["ts"], tagset="topic")
- channel.set_topic(unhtmlescape(message_json["topic"]))
+ channel.set_topic(message_json["topic"])
def process_reply(message_json, eventrouter, **kwargs):