[Telepathy] Acknowledging Messages in an Observer

Simon McVittie simon.mcvittie at collabora.co.uk
Fri Feb 10 05:37:03 PST 2012


On 09/02/12 17:06, Guillaume Desmottes wrote:
> Actually the Shell does ack messages even when it's an Observer (but
> only if user interacts with the chat bubble by expanding the toaster
> notification (yes, that's its true name) or manually opened the chat
> bubble).

I think it should at least only do that if the channel has been handled
*by someone*, to avoid Observer loggers losing the messages. For that
particular use of only-Handlers-acknowledge, it'd be OK to acknowledge
if it isn't a Handler but has been one in the past, because that means
*someone* is the Handler, so Observers have already had their chance.
Acknowledging in an Approver would not defeat that either, I don't think.

Neither of those avoids the race described below, though...

You could Claim and delegate, perhaps? Claim will block until observers
are happy, so if you only acknowledge after you've Claimed, everything
is OK.

> If not Empathy would claim that some messages are unread while they
> actually are. Empathy watches the PendingMessagesRemoved signal and so
> won't ack an already acked message.

How do you avoid the race condition where Empathy and Shell acknowledge
at the same time, the winner of the race succeeds, and the loser sees
PendingMessagesRemoved followed by a failed method reply?

    S


More information about the telepathy mailing list