-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from deltachat/notification-flow
add basic notification flow
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# shall a notification be shown? | ||
|
||
``` | ||
// on incoming message / reaction / webxdc-notify ... | ||
if notifications_granted_by_system: | ||
if not profile_muted: | ||
if not chat_muted: | ||
DO_NOTIFY() | ||
else: | ||
if is_webxdc_notify || is_reaction_to_own_message || is_reply_to_own_message: | ||
if is_multiuser_chat | ||
if mentions_enabled: | ||
DO_NOTIFY() | ||
// in all other cases: do not notify | ||
// in case the chat/app being notified is in scope, depending on UI, notification may be skipped | ||
``` |