aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2017-02-09 17:45:47 -0800
committerRyan Huber <rhuber@gmail.com>2017-02-09 17:45:47 -0800
commitefe97756955e89ea31f70ad0d3cbd53d134b0126 (patch)
tree88a0a7163e38435455186dfb01ddc73d0b91bcfb /wee_slack.py
parent8268c049c37668ef719d8dc917e8d02a6f3673e2 (diff)
downloadwee-slack-efe97756955e89ea31f70ad0d3cbd53d134b0126.tar.gz
fuck python 2 unicode so much
Diffstat (limited to 'wee_slack.py')
-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"])