[Telepathy] Gabble avatars

Dafydd Harries dafydd.harries at collabora.co.uk
Thu Oct 19 08:07:32 PDT 2006


Ar 19/10/2006 am 14:43, ysgrifennodd Simon McVittie:
> On Sun, 15 Oct 2006 at 03:47:07 +0100, Dafydd Harries wrote:
> >  - GetAvatarTokens([self_handle]) -> [""] :(
> 
> Works now. On connection to the server, the vCard manager fetches our
> own vCard (and sometimes edits it to include a better alias) - it now
> emits got-self-initial-avatar, which is received by the GabbleConnection
> and used to put our own avatar token in the presence cache.

Can you clarify what happens if GetAvatarTokens gets called before we receive
our own vCard? My intention was that the D-Bus method context would get saved
and that we would make it return when we get the vCard back. There is a corner
case where the D-Bus method can time out if it's less than the vCard timeout
though.

This is a similar problem to that of trying to call somebody as soon as you go
online: if you try right away, you probably won't have presence for them. The
difference is that you can wait for CapabilitiesChanged on that person and
time out on that; there's no way to know when it's safe to try and call
GetAvatarTokens on the self handle.

> Non-XEP-0153 clients
> ====================
> 
> If a non-XEP-0153 client (e.g. an older Gabble) is also logged in on our
> account, we have to stop advertising the avatar, because we can't
> guarantee that it won't change it without telling us, and we're not
> allowed to poll the vCard. This is implemented. However, when all
> non-conforming clients have gone away, Gabble doesn't detect this and
> start advertising an avatar again.
> 
> This could be implemented as follows: when the last non-compliant client
> goes offline, signal the vCard manager to re-download our own vCard;
> when it arrives, have the vCard manager emit a signal with the SHA-1
> which causes a presence cache update and (if the SHA-1 has changed) a
> gratuitous presence broadcast.

How do we know whether clients signed on on our other resources are compliant?

Note that we don't necessarily know when one of our other resources changes
the vCard anyway, as the XEP 0153 only provides for notification of changes to
the avatar.

> I assume this is to defend against clients which calculate a wrong SHA-1?
> 
> At the moment I just trust that Gajim (or whatever) has got its sha1
> calculation right, and start advertising that sha1 immediately. This is
> technically a XEP violation.

Perhaps worth bringing up on the Standards-JIG or jdev mailing list.

-- 
Dafydd


More information about the Telepathy mailing list