Skip to content

Commit 1517c5d

Browse files
committed
Merge branch 'fix-large-msg-metadata-encoding' into dev
2 parents 3d53c8f + 2642639 commit 1517c5d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spns/notifiers/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ def encrypt_notify_payload(data: dict, max_msg_size: int = 2500):
4848
metadata["B"] = True
4949
body = None
5050

51-
payload = bt_serialize([json.dumps(metadata), body] if body else [metadata])
51+
metadata_json = json.dumps(metadata)
52+
payload = bt_serialize([metadata_json, body] if body else [metadata_json])
5253
over = len(payload) % 256
5354
if over:
5455
payload += b"\0" * (256 - over)

0 commit comments

Comments
 (0)