From 7f7b98c5d9317fbeec7c4c76fc0e5d135c5e8969 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 27 Oct 2017 10:27:46 +0100 Subject: [PATCH] Use a special matrix.to URL for room notifs So you'll have to explicitly accept the pill completion to actually do a room notification. Note that this matches on formatted_body as the URL will only be in the formatted_body. It could also match for only HTML bodies, but the URL ought to be specific enough that it's sensible to match whatever the format is? --- synapse/push/baserules.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synapse/push/baserules.py b/synapse/push/baserules.py index 7a18afe5f9..c629e6beaa 100644 --- a/synapse/push/baserules.py +++ b/synapse/push/baserules.py @@ -244,8 +244,8 @@ BASE_APPEND_OVERRIDE_RULES = [ 'conditions': [ { 'kind': 'event_match', - 'key': 'content.body', - 'pattern': '@room', + 'key': 'content.formatted_body', + 'pattern': '*https://matrix.to/#@room*', '_id': '_roomnotif_content', }, {