summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2017-09-18 15:50:26 +0100
committerDavid Baker <dave@matrix.org>2017-09-18 15:50:26 +0100
commitb393f5db51ab1e37f364a11bfbb0440063be4753 (patch)
treed532aeba5b6486c4f16c35c94ffe75096b7371b6
parentAdd support for event_id_only push format (diff)
downloadsynapse-b393f5db51ab1e37f364a11bfbb0440063be4753.tar.xz
Use .get - it's much shorter
-rw-r--r--synapse/push/httppusher.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/push/httppusher.py b/synapse/push/httppusher.py
index 1b6510eea4..b4140e08a8 100644
--- a/synapse/push/httppusher.py
+++ b/synapse/push/httppusher.py
@@ -244,7 +244,7 @@ class HttpPusher(object):
 
     @defer.inlineCallbacks
     def _build_notification_dict(self, event, tweaks, badge):
-        if 'format' in self.data and self.data['format'] == 'event_id_only':
+        if self.data.get('format') == 'event_id_only':
             d = {
                 'notification': {
                     'event_id': event.event_id,