Rename dont_push into mark_unread

pull/7673/head
Brendan Abolivier 2020-06-10 14:24:01 +01:00
parent ec0a7b9034
commit 6f6a4bfc07
No known key found for this signature in database
GPG Key ID: 1E015C145F1916CD
2 changed files with 4 additions and 5 deletions

View File

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2014-2016 OpenMarket Ltd
# Copyright 2014-2020 The Matrix.org Foundation C.I.C.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -267,7 +267,7 @@ def _check_actions(actions):
raise InvalidRuleException("No actions found")
for a in actions:
if a in ["notify", "dont_notify", "coalesce"]:
if a in ["notify", "dont_notify", "coalesce", "mark_unread"]:
pass
elif isinstance(a, dict) and "set_tweak" in a:
pass

View File

@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2015 OpenMarket Ltd
# Copyright 2018 New Vector Ltd
# Copyright 2015-2020 The Matrix.org Foundation C.I.C.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -437,7 +436,7 @@ class EventPushActionsWorkerStore(SQLBaseStore):
# can be used to insert into the `event_push_actions_staging` table.
def _gen_entry(user_id, actions):
is_highlight = 1 if _action_has_highlight(actions) else 0
notif = 0 if "dont_push" in actions else 1
notif = 0 if "mark_unread" in actions else 1
return (
event_id, # event_id column
user_id, # user_id column