Use temporary prefixes as per the MSC

This commit is contained in:
Brendan Abolivier 2020-06-10 20:32:01 +01:00
parent aad40e38e1
commit df3323a7cf
No known key found for this signature in database
GPG Key ID: 1E015C145F1916CD
3 changed files with 5 additions and 3 deletions

View File

@ -1895,7 +1895,9 @@ class SyncHandler(object):
if notifs is not None:
unread_notifications["notification_count"] = notifs["notify_count"]
unread_notifications["highlight_count"] = notifs["highlight_count"]
unread_notifications["unread_count"] = notifs["unread_count"]
unread_notifications["org.matrix.msc2625.unread_count"] = (
notifs["unread_count"]
)
sync_result_builder.joined.append(room_sync)

View File

@ -267,7 +267,7 @@ def _check_actions(actions):
raise InvalidRuleException("No actions found")
for a in actions:
if a in ["notify", "dont_notify", "coalesce", "mark_unread"]:
if a in ["notify", "dont_notify", "coalesce", "org.matrix.msc2625.mark_unread"]:
pass
elif isinstance(a, dict) and "set_tweak" in a:
pass

View File

@ -454,7 +454,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 "mark_unread" in actions else 1
notif = 0 if "org.matrix.msc2625.mark_unread" in actions else 1
return (
event_id, # event_id column
user_id, # user_id column