From ea097b74e4623d178a58493f9693a9dce8e5c127 Mon Sep 17 00:00:00 2001 From: Mathieu Velten Date: Wed, 3 Apr 2024 15:16:22 +0200 Subject: [PATCH] Allow live location sharing for all users --- room_access_rules/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/room_access_rules/__init__.py b/room_access_rules/__init__.py index 61a60f2..ebbf23f 100644 --- a/room_access_rules/__init__.py +++ b/room_access_rules/__init__.py @@ -27,6 +27,9 @@ ACCESS_RULES_TYPE = "im.vector.room.access_rules" +LOCATION_LIVE_SHARING_EVENT_TYPE = "m.beacon_info" +LOCATION_LIVE_SHARING_MSC_EVENT_TYPE = "org.matrix.msc3672.beacon_info" + class AccessRules: DIRECT = "direct" @@ -245,6 +248,9 @@ def _get_default_power_levels(user_id: str) -> Dict[str, Any]: EventTypes.Tombstone: 100, EventTypes.ServerACL: 100, EventTypes.RoomEncryption: 100, + # We want normal users to be able to use live location sharing by default + LOCATION_LIVE_SHARING_EVENT_TYPE: 0, + LOCATION_LIVE_SHARING_MSC_EVENT_TYPE: 0, }, "events_default": 0, "state_default": 100, # Admins should be the only ones to perform other tasks