aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wee_slack.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 8e872d2..53efbb4 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -2009,6 +2009,9 @@ def subprocess_message_deleted(message_json, eventrouter, channel, team):
def subprocess_channel_topic(message_json, eventrouter, channel, team):
text = unfurl_refs(message_json["text"], ignore_alt_text=False)
+ if type(text) != unicode:
+ text = text.decode('utf-8', 'ignore')
+ text = text.encode('utf-8')
channel.buffer_prnt(w.prefix("network").rstrip(), text, message_json["ts"], tagset="muted")
channel.render_topic(message_json["topic"])