diff --git a/frontends/src/quick_frontend/constants.py b/frontends/src/quick_frontend/constants.py index fc137152..3ae05ef7 100644 --- a/frontends/src/quick_frontend/constants.py +++ b/frontends/src/quick_frontend/constants.py @@ -86,7 +86,8 @@ class Const(constants.Const): LISTENERS = {'avatar', 'nick', 'presence', 'profilePlugged', 'disconnect', 'gotMenus', 'menu', 'notification', 'notificationsClear', 'progressFinished', 'progressError'} # Notifications - NOTIFY_MESSAGE = 'MESSAGE' # a message was received - NOTIFY_MENTION = 'MENTION' # user was mentionned + NOTIFY_MESSAGE = 'MESSAGE' # a message has been received + NOTIFY_MENTION = 'MENTION' # user has been mentionned NOTIFY_PROGRESS_END = 'PROGRESS_END' # a progression has finised NOTIFY_GENERIC = 'GENERIC' # a notification which has not its own type + NOTIFY_ALL = (NOTIFY_MESSAGE, NOTIFY_MENTION, NOTIFY_PROGRESS_END, NOTIFY_GENERIC) diff --git a/frontends/src/quick_frontend/quick_app.py b/frontends/src/quick_frontend/quick_app.py index 8b3a7162..7676eace 100644 --- a/frontends/src/quick_frontend/quick_app.py +++ b/frontends/src/quick_frontend/quick_app.py @@ -636,6 +636,7 @@ class QuickApp(object): @param cb_args(list, None): list of args for callback @param widget(object, None): widget where the notification happened """ + assert type_ in C.NOTIFY_ALL notif_dict = self.profiles[profile].notifications key = '' if entity is None else entity.bare type_notifs = notif_dict.setdefault(key, {}).setdefault(type_, [])