mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Comments
This commit is contained in:
parent
3a061cae26
commit
012e8e142a
@ -189,6 +189,9 @@ class BulkPushRuleEvaluator(object):
|
|||||||
if matches:
|
if matches:
|
||||||
actions = [x for x in rule['actions'] if x != 'dont_notify']
|
actions = [x for x in rule['actions'] if x != 'dont_notify']
|
||||||
if actions and 'notify' in actions:
|
if actions and 'notify' in actions:
|
||||||
|
# Push rules say we should notify the user of this event,
|
||||||
|
# so we mark it in the DB in the staging area. (This
|
||||||
|
# will then get handled when we persist the event)
|
||||||
yield self.store.add_push_actions_to_staging(
|
yield self.store.add_push_actions_to_staging(
|
||||||
event.event_id, uid, actions,
|
event.event_id, uid, actions,
|
||||||
)
|
)
|
||||||
|
@ -762,7 +762,8 @@ class EventPushActionsStore(SQLBaseStore):
|
|||||||
Args:
|
Args:
|
||||||
event_id (str)
|
event_id (str)
|
||||||
user_id (str)
|
user_id (str)
|
||||||
actions (list)
|
actions (list[dict|str]): An action can either be a string or
|
||||||
|
dict.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Deferred
|
Deferred
|
||||||
|
@ -13,6 +13,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
-- Temporary staging area for push actions that have been calculated for an
|
||||||
|
-- event, but the event hasn't yet been persisted.
|
||||||
|
-- When the event is persisted the rows are moved over to the
|
||||||
|
-- event_push_actions table.
|
||||||
CREATE TABLE event_push_actions_staging (
|
CREATE TABLE event_push_actions_staging (
|
||||||
event_id TEXT NOT NULL,
|
event_id TEXT NOT NULL,
|
||||||
user_id TEXT NOT NULL,
|
user_id TEXT NOT NULL,
|
||||||
|
Loading…
Reference in New Issue
Block a user