diff --git a/src/command/command.c b/src/command/command.c index 78818c6d..e264f0a1 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -487,12 +487,12 @@ static struct cmd_t command_defs[] = "sub : Notifications for subscription requests.", " : on|off", "", - "Example : /notify message on (enable message notifications)", - "Example : /notify message on (enable chat room notifications)", - "Example : /notify remind 10 (remind every 10 seconds)", - "Example : /notify remind 0 (switch off reminders)", - "Example : /notify typing on (enable typing notifications)", - "Example : /notify invite on (enable chat room invite notifications)", + "Example : /notify message on (enable message notifications)", + "Example : /notify room mention (enable chat room notifications only on mention)", + "Example : /notify remind 10 (remind every 10 seconds)", + "Example : /notify remind 0 (switch off reminders)", + "Example : /notify typing on (enable typing notifications)", + "Example : /notify invite on (enable chat room invite notifications)", NULL } } }, { "/flash", diff --git a/src/ui/core.c b/src/ui/core.c index 67fa618f..c5e17803 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -1701,8 +1701,14 @@ _ui_room_message(const char * const room_jid, const char * const nick, if (g_strcmp0(room_setting, "on") == 0) { notify = TRUE; } - if ( (g_strcmp0(room_setting, "mention") == 0) && (g_strrstr(message, nick) != NULL) ) { - notify = TRUE; + if (g_strcmp0(room_setting, "mention") == 0) { + char *message_lower = g_utf8_strdown(message, -1); + char *nick_lower = g_utf8_strdown(nick, -1); + if (g_strrstr(message_lower, nick_lower) != NULL) { + notify = TRUE; + } + g_free(message_lower); + g_free(nick_lower); } if (notify) { Jid *jidp = jid_create(room_jid);