mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-24 06:50:41 -04:00
Additional constants for EDU types. (#12884)
Instead of hard-coding strings in many places.
This commit is contained in:
parent
d9f092285b
commit
c52abc1cfd
35 changed files with 146 additions and 96 deletions
|
@ -19,6 +19,7 @@ from unittest.mock import Mock
|
|||
from twisted.test.proto_helpers import MemoryReactor
|
||||
|
||||
import synapse.rest.admin
|
||||
from synapse.api.constants import EduTypes
|
||||
from synapse.rest.client import events, login, room
|
||||
from synapse.server import HomeServer
|
||||
from synapse.util import Clock
|
||||
|
@ -103,7 +104,7 @@ class EventStreamPermissionsTestCase(unittest.HomeserverTestCase):
|
|||
c
|
||||
for c in channel.json_body["chunk"]
|
||||
if not (
|
||||
c.get("type") == "m.presence"
|
||||
c.get("type") == EduTypes.PRESENCE
|
||||
and c["content"].get("user_id") == self.user_id
|
||||
)
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue