After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 663851 - Notifies me that contacts are offline when they lock their screen
Notifies me that contacts are offline when they lock their screen
Status: RESOLVED DUPLICATE of bug 667813
Product: gnome-shell
Classification: Core
Component: telepathy
3.2.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Shell Telepathy maintainer(s)
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-11-11 12:17 UTC by Will Thompson
Modified: 2012-01-13 15:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
telepathyClient: treat xa as away, not offline. (2.46 KB, patch)
2011-11-11 12:18 UTC, Will Thompson
reviewed Details | Review

Description Will Thompson 2011-11-11 12:17:47 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.
Comment 1 Will Thompson 2011-11-11 12:18:45 UTC
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.
Comment 2 Florian Müllner 2011-11-11 13:11:36 UTC
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?
Comment 3 Milan Bouchet-Valat 2012-01-13 15:22:00 UTC
*** Bug 667813 has been marked as a duplicate of this bug. ***
Comment 4 Florian Müllner 2012-01-13 15:59:55 UTC

*** This bug has been marked as a duplicate of bug 667813 ***