aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2017-02-06 22:23:55 -0800
committerRyan Huber <rhuber@gmail.com>2017-02-06 22:23:55 -0800
commit62c5c99a525e3a803934b376acdca7aae4a9fd15 (patch)
tree5b4212d0417d5b1c7fa8576b497494ca01433853
parentabb2a995bffadee33a15cdcf5438afa2be0d0d9a (diff)
downloadwee-slack-62c5c99a525e3a803934b376acdca7aae4a9fd15.tar.gz
fix unicode rendering
-rw-r--r--wee_slack.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 3ff3b04..8eb799e 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1945,7 +1945,6 @@ def subprocess_message_deleted(message_json, eventrouter, channel, team):
def process_reply(message_json, eventrouter, **kwargs):
dbg('processing reply')
- #dbg(message_json, True)
team = kwargs["team"]
identifier = message_json["reply_to"]
try:
@@ -1968,6 +1967,7 @@ def process_reply(message_json, eventrouter, **kwargs):
# channels.find(message_json["channel"]).store_message(m, from_me=True)
# channels.find(message_json["channel"]).buffer_prnt(server.nick, m.render(), m.ts)
+
process_message(m.message_json, eventrouter, channel=channel, team=team)
channel.mark_read(update_remote=True, force=True)
dbg("REPLY {}".format(message_json))
@@ -2072,6 +2072,9 @@ def render(message_json, team, channel, force=False):
text = text.replace("&lt;", "<")
text = text.replace("&gt;", ">")
text = text.replace("&amp;", "&")
+
+ if type(text) is not unicode:
+ text = text.decode('UTF-8', 'replace')
text = text.encode('utf-8')
# if self.threads: