GNOME Bugzilla – Bug 663851
Notifies me that contacts are offline when they lock their screen
Last modified: 2012-01-13 15:59:55 UTC
When I have an open conversation, I get notifications when the contact goes offline or comes back online. This was originally introduced in <http://git.gnome.org/browse/gnome-shell/commit/?id=f438ccfc>, which says: Currently we display notifications when switching between "available" and "offline"/"extended away", but when switching between "available" and "away"/"busy" we just add the information to the chat window without popping up a notification, to avoid spamming the user with "Bob's screensaver activated" messages. A worthy goal! Unfortunately, js/ui/userMenu.js sets our status to EXTENDED_AWAY when our session becomes idle: if (sessionStatus == GnomeSession.PresenceStatus.IDLE) { // Only change presence if the current one is "more present" than // idle if (this._currentPresence != Tp.ConnectionPresenceType.OFFLINE) return Tp.ConnectionPresenceType.EXTENDED_AWAY; } And gnome-session-manager signals StatusChanged(IDLE) the moment I lock my screen. So we do exactly what Dan was trying to avoid, namely spamming the user with “Bob’s screensaver activated” messages—and worse, they say “Bob is offline”, which is not even accurate.
Created attachment 201222 [details] [review] telepathyClient: treat xa as away, not offline. f438ccfc, which made xa equivalent to offline, says: Currently we display notifications when switching between "available" and "offline"/"extended away", but when switching between "available" and "away"/"busy" we just add the information to the chat window without popping up a notification, to avoid spamming the user with "Bob's screensaver activated" messages. But js/ui/userMenu.js sets the user's status to EXTENDED_AWAY when the session becomes idle, which happens when they lock the screen, so we do exactly what Dan was trying to avoid: when Yvonne locks her screen, I get a bubble saying “Yvonne is offline.”, which is both untrue and unnecessary. So this patch changes the notification logic to treat EXTENDED_AWAY as equivalent to AWAY.
Review of attachment 201222 [details] [review]: Of course the person who implemented the user menu changes (me) has little to no idea about Telepathy, so maybe using EXTENDED_AWAY for idle is wrong? (Not saying it is, just mentioning it to make it clear that there's no thorough design decision behind that particular choice - if you think XA is wrong, I'll trust your judgement) Otherwise, code looks good. ::: js/ui/telepathyClient.js @@ +734,3 @@ + // Treat Away and XA as exactly equivalent + if (presence == Tp.ConnectionPresenceType.EXTENDED_AWAY) + presence = Tp.ConnectionPresenceType.AWAY; Maybe the reason for this change is more obvious if "inline" in the big if-else block (where msg and shouldNotify are set) like the current code does?
*** Bug 667813 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of bug 667813 ***