mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-23 10:05:55 +03:00
Use the constant
This commit is contained in:
parent
29c8cf8db8
commit
e7a76b5123
1 changed files with 2 additions and 1 deletions
|
@ -27,6 +27,7 @@ from synapse.util.presentable_names import (
|
||||||
)
|
)
|
||||||
from synapse.types import UserID
|
from synapse.types import UserID
|
||||||
from synapse.api.errors import StoreError
|
from synapse.api.errors import StoreError
|
||||||
|
from synapse.api.constants import EventTypes
|
||||||
|
|
||||||
import jinja2
|
import jinja2
|
||||||
import bleach
|
import bleach
|
||||||
|
@ -209,7 +210,7 @@ class Mailer(object):
|
||||||
defer.returnValue(ret)
|
defer.returnValue(ret)
|
||||||
|
|
||||||
def get_message_vars(self, notif, event, room_state):
|
def get_message_vars(self, notif, event, room_state):
|
||||||
if event.type != "m.room.message":
|
if event.type != EventTypes.Message:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
sender_state_event = room_state[("m.room.member", event.sender)]
|
sender_state_event = room_state[("m.room.member", event.sender)]
|
||||||
|
|
Loading…
Reference in a new issue