diff options
author | Erik Johnston <erik@matrix.org> | 2017-10-02 13:52:03 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-10-02 13:52:03 +0100 |
commit | b23cb8fba8c783bf7a267bfbe33b50e010f17787 (patch) | |
tree | c43dc5b7ba3eb73bff695cae67f7c4122134a0ef /synapse/push/httppusher.py | |
parent | Merge pull request #2464 from rnbdsh/patch-4 (diff) | |
parent | Bump version and change log (diff) | |
download | synapse-b23cb8fba8c783bf7a267bfbe33b50e010f17787.tar.xz |
Merge branch 'release-v0.23.0' of github.com:matrix-org/synapse v0.23.0
Diffstat (limited to 'synapse/push/httppusher.py')
-rw-r--r-- | synapse/push/httppusher.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/synapse/push/httppusher.py b/synapse/push/httppusher.py index 8a5d473108..62c41cd9db 100644 --- a/synapse/push/httppusher.py +++ b/synapse/push/httppusher.py @@ -244,6 +244,26 @@ class HttpPusher(object): @defer.inlineCallbacks def _build_notification_dict(self, event, tweaks, badge): + if self.data.get('format') == 'event_id_only': + d = { + 'notification': { + 'event_id': event.event_id, + 'room_id': event.room_id, + 'counts': { + 'unread': badge, + }, + 'devices': [ + { + 'app_id': self.app_id, + 'pushkey': self.pushkey, + 'pushkey_ts': long(self.pushkey_ts / 1000), + 'data': self.data_minus_url, + } + ] + } + } + defer.returnValue(d) + ctx = yield push_tools.get_context_for_event( self.store, self.state_handler, event, self.user_id ) |