mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-09-29 22:33:40 -05:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user