Fix notice bridging exceptions

This commit is contained in:
Tulir Asokan
2018-09-29 01:13:07 +03:00
parent 56fb88b75e
commit 2f6147f325
+4 -4
View File
@@ -982,12 +982,12 @@ class Portal:
msgtype = message["msgtype"] msgtype = message["msgtype"]
if msgtype == "m.notice": if msgtype == "m.notice":
bridge_notices = self.get_config("bridge_notices") bridge_notices = self.get_config("bridge_notices.default")
if not bridge_notices.get("default", False) and sender_id not in bridge_notices.get( excepted = sender.mxid in self.get_config("bridge_notices.exceptions")
"exceptions"): if not bridge_notices and not excepted:
return return
if msgtype == "m.text": if msgtype == "m.text" or msgtype == "m.notice":
await self._handle_matrix_text(sender_id, event_id, space, client, message, reply_to) await self._handle_matrix_text(sender_id, event_id, space, client, message, reply_to)
elif msgtype == "m.location": elif msgtype == "m.location":
await self._handle_matrix_location(sender_id, event_id, space, client, message, await self._handle_matrix_location(sender_id, event_id, space, client, message,