Skip to content
Snippets Groups Projects
Commit 472be886 authored by Erik Johnston's avatar Erik Johnston
Browse files

We store pusher data as bytes

parent a6e62cf6
No related branches found
No related tags found
No related merge requests found
...@@ -53,7 +53,7 @@ class PusherStore(SQLBaseStore): ...@@ -53,7 +53,7 @@ class PusherStore(SQLBaseStore):
dataJson = r['data'] dataJson = r['data']
r['data'] = None r['data'] = None
try: try:
r['data'] = json.loads(dataJson) r['data'] = json.loads(str(dataJson).decode("UTF8"))
except: except:
logger.warn("Invalid JSON in data for pusher %d: %s", r['id'], dataJson) logger.warn("Invalid JSON in data for pusher %d: %s", r['id'], dataJson)
pass pass
...@@ -81,7 +81,7 @@ class PusherStore(SQLBaseStore): ...@@ -81,7 +81,7 @@ class PusherStore(SQLBaseStore):
device_display_name=device_display_name, device_display_name=device_display_name,
ts=pushkey_ts, ts=pushkey_ts,
lang=lang, lang=lang,
data=encode_canonical_json(data).decode("UTF-8"), data=encode_canonical_json(data),
), ),
insertion_values=dict( insertion_values=dict(
id=next_id, id=next_id,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment