[Bug 33410] Do on-disk avatar cache in CM

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue May 22 14:03:40 CEST 2012


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

--- Comment #12 from Xavier Claessens <xclaesse at gmail.com> 2012-05-22 05:03:40 PDT ---
tp-spec and tp-glib branches updated. The problems I'm worried are:

Offline XMPP contacts
---------------------
They don't have the token. Clients should not request those avatars except if
it does persistent storage so it could request avatar only once (e.g. contactsd
on N9).

When the client gets the contact attributes, if avatar-uri is omitted it can't
know if CM has the token or not. So it doesn't know if he should request the
avatar.

I've solved that by telling in avatar-uri attribute spec that if CM has the
token but image is not in cache, it should omit from reply but start the
request. Like that client-side we know that we won't have to call
RequestAvatars. Is that a good idea? See bug #50082 comment #5 about implicit
requests in contact attributes getters in general.

Another solution I though about, is to add an avatar-needs-request contact
attribute. Which makes sense considering the AvatarsNeedRequest signal...

Initial population of avatars-mixin
-----------------------------------
I guess when gabble receives the roster, it will call
tp_avatars_mixin_avatar_changed() for each contact that has an avatar token,
which emits AvatarUpdate for each... Shouldn't we avoid those initial signals?
Maybe I should add a boolean arg in that method to tell not emit signals?



So I would appreciate if people could take a look at current
spec/implementation and give their opinions :)

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



More information about the telepathy-bugs mailing list