mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-15 02:13:52 +01:00
Use encode_canonical_json for pushes
This commit is contained in:
parent
af89456c3c
commit
e9e54449f5
1 changed files with 3 additions and 1 deletions
|
@ -19,6 +19,8 @@ from twisted.internet import defer
|
||||||
from httppusher import HttpPusher
|
from httppusher import HttpPusher
|
||||||
from synapse.push import PusherConfigException
|
from synapse.push import PusherConfigException
|
||||||
|
|
||||||
|
from syutil.jsonutil import encode_canonical_json
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import simplejson as json
|
import simplejson as json
|
||||||
|
|
||||||
|
@ -96,7 +98,7 @@ class PusherPool:
|
||||||
pushkey=pushkey,
|
pushkey=pushkey,
|
||||||
pushkey_ts=self.hs.get_clock().time_msec(),
|
pushkey_ts=self.hs.get_clock().time_msec(),
|
||||||
lang=lang,
|
lang=lang,
|
||||||
data=json.dumps(data)
|
data=encode_canonical_json(data).decode("UTF-8"),
|
||||||
)
|
)
|
||||||
self._refresh_pusher((app_id, pushkey))
|
self._refresh_pusher((app_id, pushkey))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue