X-Git-Url: http://git.treefish.org/~alex/mtxbot.git/blobdiff_plain/78728c1ec35a28086bf6939eb8afaaae897fa3e5..6c4dbc2edd8bf5cac128c2fa48728d8abe52432e:/src/presence.py?ds=sidebyside diff --git a/src/presence.py b/src/presence.py index b3da858..7430ee8 100644 --- a/src/presence.py +++ b/src/presence.py @@ -72,6 +72,7 @@ class Presence: try: msgB64Bytes = line.rstrip("\n").encode("UTF-8") msgBytes = base64.b64decode(msgB64Bytes) + msgStr = msgBytes.decode("UTF-8") except: self._log(logging.WARNING, "Error decoding message") continue @@ -80,7 +81,7 @@ class Presence: message_type="m.room.message", content={ "msgtype": "m.text", - "body": msgBytes.decode("UTF-8") + "body": msgStr } ) else: