Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

No longer notify on messages sent by yourself from different tab. Fixes #592 #627

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ghost
Copy link

@ghost ghost commented Jan 29, 2016

Messages from yourself, or whois responses, no longer trigger a notification on a second client you may have running.

var settings = $.cookie("settings") || {};
if (highlight || isQuery || (settings.notifyAllMessages && message)) {
if ((highlight || isQuery || (settings.notifyAllMessages && message)) && !self && !whois) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not move this code down after checking ignore array so that the same filtering applies?

Copy link
Author

Choose a reason for hiding this comment

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

True, I could probably change that part a bit since it's now doing some checks twice (such as whether or not the channel receiving the message is active or not). Once for the notification, and once for the badge.

@ghost
Copy link
Author

ghost commented Jan 29, 2016

Integrated xPaw's comment in this latest commit. As a result, you'll now also no longer receive a badge next to a channel if you were the one sending the message using a second client.

}
}

if (msg.self) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You can have this if the first thing in the function.

@xPaw
Copy link
Contributor

xPaw commented Jan 30, 2016

👍 looks good

@astorije
Copy link
Collaborator

FYI, this is under review for The Lounge: thelounge/thelounge#6

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants