Don't show notification reminders for messages the user does not want notifications for

This commit is contained in:
James Booth
2016-02-04 01:24:37 +00:00
parent e1962261a9
commit 6702bb9739
8 changed files with 57 additions and 49 deletions

View File

@@ -228,9 +228,13 @@ prefs_message_get_triggers(const char *const message)
}
gboolean
prefs_do_room_notify(gboolean current_win, const char *const roomjid, const char *const nick, const char *const message,
gboolean mention, gboolean trigger_found)
prefs_do_room_notify(gboolean current_win, const char *const roomjid, const char *const mynick,
const char *const theirnick, const char *const message, gboolean mention, gboolean trigger_found)
{
if (g_strcmp0(mynick, theirnick) == 0) {
return FALSE;
}
gboolean notify_current = prefs_get_boolean(PREF_NOTIFY_ROOM_CURRENT);
gboolean notify_window = FALSE;
if (!current_win || (current_win && notify_current) ) {

View File

@@ -232,8 +232,8 @@ void prefs_free_string(char *pref);
void prefs_set_string(preference_t pref, char *value);
gboolean prefs_do_chat_notify(gboolean current_win);
gboolean prefs_do_room_notify(gboolean current_win, const char *const roomjid, const char *const nick,
const char *const message, gboolean mention, gboolean trigger_found);
gboolean prefs_do_room_notify(gboolean current_win, const char *const roomjid, const char *const mynick,
const char *const theirnick, const char *const message, gboolean mention, gboolean trigger_found);
GList* prefs_message_get_triggers(const char *const message);
void prefs_set_room_notify(const char *const roomjid, gboolean value);