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.
This commit is contained in:
Guangcong Luo
2016-09-13 18:36:48 -04:00
parent 05914194c6
commit 7ab332673b

View File

@@ -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;