Bug 24882 - ChatStates should have an initial state download
Summary: ChatStates should have an initial state download
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-spec (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Simon McVittie
QA Contact: Telepathy bugs list
URL:
Whiteboard: 0.19.7
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-03 10:17 UTC by Simon McVittie
Modified: 2010-06-14 03:51 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Simon McVittie 2009-11-03 10:17:56 UTC
ChatStates only provides a change notification, and no way to download the initial state. This is clearly silly, if your UI exposes more than just a boolean state (Composing vs. the rest).

In practice I expect that most UIs will only care about Composing anyway, but for completeness, I propose:

mapping Chat_State_Map : a{uu}
    A map from contacts to their chat states.

    Contact: u, Contact_Handle
        A contact
    State: u, Channel_Chat_State
        The chat state corresponding to that contact

property ChatStates : a{uu}, Chat_State_Map
    A map containing the chat states of all contacts in this
    channel whose chat state is not Inactive.

    Contacts in this channel, but who are not listed in this map,
    may be assumed to be in the Inactive state.

    In implementations that do not have this property, its value may be
    assumed to be empty.

    | This property was not present in older versions of telepathy-spec.
    | In CMs that follow those older versions, following this rule will
    | mean that initial chat states will always be assumed to be Inactive,
    | which is the best we can do here.

Tagging this as patch to get it in the review queue, since the wording shown above is effectively a patch :-)
Comment 1 Simon McVittie 2009-11-05 08:18:50 UTC
Spec cabal authorization from wjt, sjoerd, cassidy. I'll XML it up and get it reviewed.
Comment 2 Simon McVittie 2009-11-06 12:31:53 UTC
http://people.freedesktop.org/~smcv/telepathy-spec-chat_state_recoverability/spec/

Also needs a trial implementation, so not really ready for merge yet. I have one for Gabble, although it needs a bit of rebasing.
Comment 4 Sjoerd Simons 2010-01-20 07:58:24 UTC
spec cabal says ok!
Comment 5 Simon McVittie 2010-06-07 08:23:20 UTC
Here's a sketchy implementation, which is as straightforward as you'd expect:

http://git.collabora.co.uk/?p=user/smcv/telepathy-gabble-smcv.git;a=shortlog;h=refs/heads/chat-state-recovery-2

I'd like to get this in the next telepathy-spec release and finally cross this bug off the list. Any objections? The linked spec branch only has one commit.
Comment 6 Guillaume Desmottes 2010-06-11 06:33:38 UTC
looks good to me.
Comment 7 Simon McVittie 2010-06-14 03:51:31 UTC
Fixed in git, will be considered stable in 0.19.7. I'll file a separate bug for the implementation in Gabble.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.