summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-04-29 19:10:45 +0100
committerDavid Baker <dave@matrix.org>2016-04-29 19:10:45 +0100
commite7a76b512302ee77e3afc6c17dfb2efc3b58b156 (patch)
treef75e066cbccdde228988adbcd5e2aac98ec86553
parentAvoid `vars` builtin (diff)
downloadsynapse-e7a76b512302ee77e3afc6c17dfb2efc3b58b156.tar.xz
Use the constant
Diffstat (limited to '')
-rw-r--r--synapse/push/mailer.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/push/mailer.py b/synapse/push/mailer.py
index 95f872ccf0..1e6654e2bb 100644
--- a/synapse/push/mailer.py
+++ b/synapse/push/mailer.py
@@ -27,6 +27,7 @@ from synapse.util.presentable_names import (
 )
 from synapse.types import UserID
 from synapse.api.errors import StoreError
+from synapse.api.constants import EventTypes
 
 import jinja2
 import bleach
@@ -209,7 +210,7 @@ class Mailer(object):
         defer.returnValue(ret)
 
     def get_message_vars(self, notif, event, room_state):
-        if event.type != "m.room.message":
+        if event.type != EventTypes.Message:
             return None
 
         sender_state_event = room_state[("m.room.member", event.sender)]