From 7ab332673b80096d94debeef94d8d28403be069c Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Tue, 13 Sep 2016 18:36:48 -0400 Subject: [PATCH] Don't notify for own messages For the most part, this isn't really a big deal: If you send a message, you usually have the window open, so you can see that you've sent a message. This is mainly for things like if you send a message and switch rooms before it appears in the roomlog, but it's really mainly for things like /hotpatch where you don't need to be notified about all the rooms that notify you. --- js/client-chat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/client-chat.js b/js/client-chat.js index 605c255cb..7cfa20a24 100644 --- a/js/client-chat.js +++ b/js/client-chat.js @@ -1417,7 +1417,7 @@ var lastMessageDates = Tools.prefs('logtimes') || (Tools.prefs('logtimes', {}), Tools.prefs('logtimes')); if (!lastMessageDates[Config.server.id]) lastMessageDates[Config.server.id] = {}; var lastMessageDate = lastMessageDates[Config.server.id][this.id] || 0; - var mayNotify = msgTime > lastMessageDate; + var mayNotify = msgTime > lastMessageDate && userid !== app.user.get('userid'); if (app.focused && (this === app.curSideRoom || this === app.curRoom)) { this.lastMessageDate = 0;