Add m.encryption to event types

This commit is contained in:
David Baker 2018-06-22 16:47:49 +01:00
parent fd28d13e19
commit 3d0faa39fb
2 changed files with 3 additions and 1 deletions

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright 2014-2016 OpenMarket Ltd # Copyright 2014-2016 OpenMarket Ltd
# Copyright 2017 Vector Creations Ltd # Copyright 2017 Vector Creations Ltd
# Copyright 2018 New Vector Ltd
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@ -70,6 +71,7 @@ class EventTypes(object):
CanonicalAlias = "m.room.canonical_alias" CanonicalAlias = "m.room.canonical_alias"
RoomAvatar = "m.room.avatar" RoomAvatar = "m.room.avatar"
GuestAccess = "m.room.guest_access" GuestAccess = "m.room.guest_access"
Encryption = "m.room.encryption"
# These are used for validation # These are used for validation
Message = "m.room.message" Message = "m.room.message"

View file

@ -377,7 +377,7 @@ class RoomCreationHandler(BaseHandler):
if "encryption_alg" in config: if "encryption_alg" in config:
send( send(
etype="m.room.encryption", etype=EventTypes.Encryption,
state_key="", state_key="",
content={ content={
'algorithm': config["encryption_alg"], 'algorithm': config["encryption_alg"],