[Telepathy] Gabble avatars

Robert McQueen robert.mcqueen at collabora.co.uk
Thu Oct 19 08:55:32 PDT 2006


Simon McVittie wrote:
> At the moment GetAvatarTokens returns "", same as if we don't have
> any presence yet for one of the other contacts. I can change it, though;
> since we kick off the vCard request immediately anyway, GetAvatarTokens
> should probably block til that returns.

The spec recommends that upon connection, an avatar capable client
immediately compares the token for the self handle with the last value
to see if the client needs to set it again, or consider downloading a
new one. This is because some protocols have no server-stored avatars,
so it needs setting every connection, but we don't want to require that
on protocols that do, the client re-uploads the avatar un-necessarily
(which is what it'd do if we returned "" to the client). So yeah, we
need to delay returning from GetAvatarToken([self_handle]) until we have
our vcard back.

> Rob McQueen recommends violating this part of the XEP too, and just assuming
> that any non-XEP-0153 clients won't touch the PHOTO. This is a simple
> thing to do, and should be basically OK, as long as Gabble is robust
> against the following case:
> 
> * We tell the Telepathy UI our own avatar has SHA-1 aaaa
> * The other, non-compliant, client quietly changes the PHOTO to one
>   whose SHA-1 is bbbb
> * The UI calls RequestAvatar(self_handle, "aaaa")
> 
> which I'm going to handle by making RequestAvatar() fail, more or less
> simultaneously emitting AvatarUpdated with token bbbb, and starting to
> include bbbb in the advertised presence from then on.

Yeah, this XEP is Historical rather than Normative, so I don't have much
shame in just ignoring that bit in favour of making avatars work. This
protocol is subtly broken anyway, and I'm sure that most other clients
don't really do this properly either. I don't really think it's
necessary to disable our avatar support if other clients without
vcard-temp:update support are connected. A brief review of a few other
clients would confirm or disprove my suspicions, and I'll gladly revise
my opinion if many of Gaim/Gajim/Psi/Gtalk/Kopete behave in this "if
everyone doesn't play nicely, nobody gets to play at all" way.

Regards,
Rob


More information about the Telepathy mailing list