summary refs log tree commit diff
path: root/synapse/storage/databases
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-09-08 10:00:43 -0400
committerGitHub <noreply@github.com>2021-09-08 10:00:43 -0400
commit0288e6033b08149867e742283bb0139f10b66b01 (patch)
tree968d6379f70b6d30c4ba861bf2cd3fc1db61df10 /synapse/storage/databases
parentChange logging of puppeted requests to better differentiate users (#10779) (diff)
downloadsynapse-0288e6033b08149867e742283bb0139f10b66b01.tar.xz
Add a constant for m.federate. (#10775)
Diffstat (limited to 'synapse/storage/databases')
-rw-r--r--synapse/storage/databases/main/stats.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/databases/main/stats.py b/synapse/storage/databases/main/stats.py
index 42edbcc057..4245fa1a3c 100644
--- a/synapse/storage/databases/main/stats.py
+++ b/synapse/storage/databases/main/stats.py
@@ -22,7 +22,7 @@ from typing_extensions import Counter
 
 from twisted.internet.defer import DeferredLock
 
-from synapse.api.constants import EventTypes, Membership
+from synapse.api.constants import EventContentFields, EventTypes, Membership
 from synapse.api.errors import StoreError
 from synapse.storage.database import DatabasePool
 from synapse.storage.databases.main.state_deltas import StateDeltasStore
@@ -590,7 +590,7 @@ class StatsStore(StateDeltasStore):
                 room_state["canonical_alias"] = event.content.get("alias")
             elif event.type == EventTypes.Create:
                 room_state["is_federatable"] = (
-                    event.content.get("m.federate", True) is True
+                    event.content.get(EventContentFields.FEDERATE, True) is True
                 )
 
         await self.update_room_state(room_id, room_state)