mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-14 21:45:25 -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
|
@ -12,6 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from synapse.api.constants import EduTypes
|
||||
from synapse.rest import admin
|
||||
from synapse.rest.client import login, sendtodevice, sync
|
||||
|
||||
|
@ -139,7 +140,7 @@ class SendToDeviceTestCase(HomeserverTestCase):
|
|||
for i in range(3):
|
||||
self.get_success(
|
||||
federation_registry.on_edu(
|
||||
"m.direct_to_device",
|
||||
EduTypes.DIRECT_TO_DEVICE,
|
||||
"remote_server",
|
||||
{
|
||||
"sender": "@user:remote_server",
|
||||
|
@ -172,7 +173,7 @@ class SendToDeviceTestCase(HomeserverTestCase):
|
|||
# and we can send more messages
|
||||
self.get_success(
|
||||
federation_registry.on_edu(
|
||||
"m.direct_to_device",
|
||||
EduTypes.DIRECT_TO_DEVICE,
|
||||
"remote_server",
|
||||
{
|
||||
"sender": "@user:remote_server",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue