瀏覽代碼

Migrate encryption state on room upgrade (#4411)

* Migrate encryption state on room upgrade

Signed-off-by: Andrew Morgan <andrew@amorgan.xyz>

* Add changelog file
Andrew Morgan 5 年之前
父節點
當前提交
702c4b750c
共有 3 個文件被更改,包括 3 次插入0 次删除
  1. 1 0
      changelog.d/4411.bugfix
  2. 1 0
      synapse/api/constants.py
  3. 1 0
      synapse/handlers/room.py

+ 1 - 0
changelog.d/4411.bugfix

@@ -0,0 +1 @@
+Ensure encrypted room state is persisted across room upgrades.

+ 1 - 0
synapse/api/constants.py

@@ -68,6 +68,7 @@ class EventTypes(object):
     Aliases = "m.room.aliases"
     Redaction = "m.room.redaction"
     ThirdPartyInvite = "m.room.third_party_invite"
+    Encryption = "m.room.encryption"
 
     RoomHistoryVisibility = "m.room.history_visibility"
     CanonicalAlias = "m.room.canonical_alias"

+ 1 - 0
synapse/handlers/room.py

@@ -269,6 +269,7 @@ class RoomCreationHandler(BaseHandler):
             (EventTypes.RoomHistoryVisibility, ""),
             (EventTypes.GuestAccess, ""),
             (EventTypes.RoomAvatar, ""),
+            (EventTypes.Encryption, ""),
         )
 
         old_room_state_ids = yield self.store.get_filtered_current_state_ids(