We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15f67ce commit 3a1835fCopy full SHA for 3a1835f
1 file changed
threema/gateway/e2e.py
@@ -246,7 +246,7 @@ def add_callback_route(
246
if receive_handler is None:
247
receive_handler = Message.receive
248
context = CallbackContext(
249
- connection.secret.encode('ascii'),
+ connection.secret.encode('utf-8'),
250
connection,
251
message_handler,
252
receive_handler,
@@ -1288,7 +1288,7 @@ async def pack(self, writer):
1288
1289
# Pack payload (compact JSON encoding)
1290
try:
1291
- content = json.dumps(content, separators=(',', ':')).encode('ascii')
+ content = json.dumps(content, separators=(',', ':')).encode('utf-8')
1292
except UnicodeError as exc:
1293
raise MessageError('Could not encode JSON') from exc
1294
0 commit comments