summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2022-04-27 09:00:07 -0400
committerGitHub <noreply@github.com>2022-04-27 09:00:07 -0400
commit8a23bde82352f18d7d6f098e3f3f0ce7099efb86 (patch)
tree69f616cbc1b195490d8c82650db705fc5ea9bfc7 /synapse/storage
parentAdd option to enable token registration without requiring 3pids (#12526) (diff)
downloadsynapse-8a23bde82352f18d7d6f098e3f3f0ce7099efb86.tar.xz
Consistently use collections.abc.Mapping to check frozendict. (#12564)
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/databases/main/state.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/storage/databases/main/state.py b/synapse/storage/databases/main/state.py
index 5e340bd03d..18ae8aee29 100644
--- a/synapse/storage/databases/main/state.py
+++ b/synapse/storage/databases/main/state.py
@@ -12,11 +12,10 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+import collections.abc
 import logging
 from typing import TYPE_CHECKING, Collection, Dict, Iterable, Optional, Set, Tuple
 
-from frozendict import frozendict
-
 from synapse.api.constants import EventTypes, Membership
 from synapse.api.errors import NotFoundError, UnsupportedRoomVersionError
 from synapse.api.room_versions import KNOWN_ROOM_VERSIONS, RoomVersion
@@ -160,7 +159,7 @@ class StateGroupWorkerStore(EventsWorkerStore, SQLBaseStore):
         predecessor = create_event.content.get("predecessor", None)
 
         # Ensure the key is a dictionary
-        if not isinstance(predecessor, (dict, frozendict)):
+        if not isinstance(predecessor, collections.abc.Mapping):
             return None
 
         # The keys must be strings since the data is JSON.