Skip to content
2 changes: 1 addition & 1 deletion src/event/server_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ sv_ev_room_message(ProfMessage* message)
}
mucwin->last_msg_timestamp = g_date_time_new_now_local();

if (prefs_do_room_notify(is_current, mucwin->roomjid, mynick, message->from_jid->resourcepart, message->plain, mention, triggers != NULL)) {
if ((prefs_do_room_notify(is_current, mucwin->roomjid, mynick, message->from_jid->resourcepart, message->plain, mention, triggers != NULL) && !wins_is_current(window)) || ui_get_idle_time() > 1000) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue with conditions as explained in another comment.

auto_jid Jid* jidp = jid_create(mucwin->roomjid);
if (jidp) {
notify_room_message(message->from_jid->resourcepart, jidp->localpart, num, message->plain);
Expand Down
3 changes: 1 addition & 2 deletions src/ui/chatwin.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,9 @@ chatwin_incoming_msg(ProfChatWin* chatwin, ProfMessage* message, gboolean win_cr
}
}

if (notify) {
if ((notify && !wins_is_current(window)) || ui_get_idle_time() > 1000) {
notify_message(display_name, num, message->plain);
}

plugins_post_chat_message_display(message->from_jid->barejid, message->from_jid->resourcepart, message->plain);

message->plain = old_plain;
Expand Down