[Bug 26752] Setting a not supported presence state to a telepathy account does not deliver any failing feedback

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Apr 29 17:15:39 CEST 2010


https://bugs.freedesktop.org/show_bug.cgi?id=26752

--- Comment #7 from Andre Moreira Magalhaes <andrunko at gmail.com> 2010-04-29 08:15:38 PDT ---
(In reply to comment #6)
> (In reply to comment #5)
> > Implemented a slightly modified version of Account.ChangingPresence. The
> > implementation changes the property to true whenever
> > Connection.SimplePresence.SetPresence is called
> 
> What's the difference between my proposal, and what you implemented? Is it
> this, or something else?
> 
> * my proposal: ChangingPresence is set as soon as we "want to" change presence
> * your implementation: ChangingPresence is set only when we actually call
> SetPresence
> 
> If it's that, then I prefer my version. Here's a sequence of events which
> should hopefully illustrate why:
That is it. I chose to do it this way as we signal ChangingPresence really when
the presence is changing, not when we asked for it. So if we are offline and
someones asks to change the presence to Foo, we will first attempt to connect,
then change change the presence. Only when SetPresence is called the
ChangingPresence changes. I can change it and move the Set(ChangingPresence,
TRUE) code to set_requested_presence in mcd-account.c, but we would need to
cover other cases as when the connection cannot go online, as in
connection_error and connection_abort to change the ChangingPresence property
back to false on error.

This is what the impl does:
 * initially:
 *     Connection = "/"
 *     ConnectionStatus = DISCONNECTED
 *     RequestedPresence = CurrentPresence = (OFFLINE, "offline", "")
 *     ChangingPresence = FALSE
 * UI calls Set(RequestedPresence, (HIDDEN, "hidden", "I'm not here"))
 * emit AccountPropertiesChanged ({
     Connection: "/",
     ConnectionStatus: CONNECTING,
     RequestedPresence: (HIDDEN, "hidden", "I'm not here"),
   })
 * call RequestConnection on CM
 * return from Set with success
 * time passes
 * CM.RequestConnection returns /my/conn
 * emit AccountPropertiesChanged ({
     Connection: "/my/conn",
     ConnectionStatus: CONNECTING,
   })
 * ChangingPresence = TRUE
 * emit AccountPropertiesChanged ({
     ChangingPresence: TRUE,
   })
 * call SetPresence on connection
 * call Connect on connection
 * time passes
 * Connect returns success
 * time passes
 * StatusChanged(CONNECTED)
 * emit AccountPropertiesChanged ({
     Connection: "/my/conn",
     ConnectionStatus: CONNECTED,
   })
 * call GetPresence to fetch the real presence
 * oops! CM didn't support HIDDEN and fell back to BUSY
 * GetPresence returns (BUSY, "dnd", "I'm not here")
 * emit AccountPropertiesChanged ({
     Connection: "/my/conn",
     ConnectionStatus: CONNECTED,
     ChangingPresence: FALSE,
     CurrentPresence: (BUSY, "dnd", "I'm not here"),
   })

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the telepathy-bugs mailing list