mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-09 16:14:57 -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
|
@ -22,6 +22,7 @@ from twisted.test.proto_helpers import MemoryReactor
|
|||
|
||||
import synapse.rest.admin
|
||||
from synapse.api.constants import (
|
||||
EduTypes,
|
||||
EventContentFields,
|
||||
EventTypes,
|
||||
ReceiptTypes,
|
||||
|
@ -504,7 +505,7 @@ class ReadReceiptsTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
# Checks if event is a read receipt
|
||||
def is_read_receipt(event: JsonDict) -> bool:
|
||||
return event["type"] == "m.receipt"
|
||||
return event["type"] == EduTypes.RECEIPT
|
||||
|
||||
# Sync
|
||||
channel = self.make_request(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue