mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-11-13 22:20:37 -05: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
|
|
@ -20,7 +20,7 @@ from unittest.mock import patch
|
|||
import jsonschema
|
||||
from frozendict import frozendict
|
||||
|
||||
from synapse.api.constants import EventContentFields
|
||||
from synapse.api.constants import EduTypes, EventContentFields
|
||||
from synapse.api.errors import SynapseError
|
||||
from synapse.api.filtering import Filter
|
||||
from synapse.events import make_event_from_dict
|
||||
|
|
@ -85,13 +85,13 @@ class FilteringTestCase(unittest.HomeserverTestCase):
|
|||
"org.matrix.not_labels": ["#work"],
|
||||
},
|
||||
"ephemeral": {
|
||||
"types": ["m.receipt", "m.typing"],
|
||||
"types": [EduTypes.RECEIPT, EduTypes.TYPING],
|
||||
"not_rooms": ["!726s6s6q:example.com"],
|
||||
"not_senders": ["@spam:example.com"],
|
||||
},
|
||||
},
|
||||
"presence": {
|
||||
"types": ["m.presence"],
|
||||
"types": [EduTypes.PRESENCE],
|
||||
"not_senders": ["@alice:example.com"],
|
||||
},
|
||||
"event_format": "client",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue