diff options
author | David Baker <dave@matrix.org> | 2016-04-08 15:29:59 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2016-04-08 15:29:59 +0100 |
commit | ed3979df5faac6d63990f4230662ff8cdcf59584 (patch) | |
tree | 37e6f6928bfd6ed183d40de36d0e53812678af3c /synapse/storage | |
parent | Make sure max stream ordering only increases (diff) | |
download | synapse-ed3979df5faac6d63990f4230662ff8cdcf59584.tar.xz |
Fix invite pushes
* If the event is an invite event, add the invitee to list of user we run push rules for (if they have a pusher etc) * Move invite_for_me to be higher prio than member events otherwise member events matches them * Spell override right
Diffstat (limited to '')
-rw-r--r-- | synapse/storage/pusher.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/storage/pusher.py b/synapse/storage/pusher.py index b34a30a8fb..19888a8e76 100644 --- a/synapse/storage/pusher.py +++ b/synapse/storage/pusher.py @@ -50,6 +50,13 @@ class PusherStore(SQLBaseStore): return rows @defer.inlineCallbacks + def user_has_pusher(self, user_id): + ret = yield self._simple_select_one_onecol( + "pushers", {"user_name": user_id}, "id", allow_none=True + ) + defer.returnValue(ret is not None) + + @defer.inlineCallbacks def get_pushers_by_app_id_and_pushkey(self, app_id, pushkey): def r(txn): sql = ( |