mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Comment
This commit is contained in:
parent
502ae6c663
commit
138e030cfe
@ -36,7 +36,10 @@ def _serialize_action(actions, is_highlight):
|
|||||||
"""Custom serializer for actions. This allows us to "compress" common actions.
|
"""Custom serializer for actions. This allows us to "compress" common actions.
|
||||||
|
|
||||||
We use the fact that most users have the same actions for notifs (and for
|
We use the fact that most users have the same actions for notifs (and for
|
||||||
highlights). We replaces these default actions with the emtpy string.
|
highlights).
|
||||||
|
We store these default actions as the empty string rather than the full JSON.
|
||||||
|
Since the empty string isn't valid JSON there is no risk of this clashing with
|
||||||
|
any real JSON actions
|
||||||
"""
|
"""
|
||||||
if is_highlight:
|
if is_highlight:
|
||||||
if actions == DEFAULT_HIGHLIGHT_ACTION:
|
if actions == DEFAULT_HIGHLIGHT_ACTION:
|
||||||
|
Loading…
Reference in New Issue
Block a user