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

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon May 14 13:50:08 CEST 2012


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

--- Comment #6 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2012-05-14 04:50:08 PDT ---
+ <tp:contact-attribute name="AvatarURI" type="s"
+ tp:name-for-bindings="Avatar_URI">

Should be called avatar-uri.

The documentation should say that:

* it must be a file URI starting with file:/// as defined by RFC 1738

* it points into a cache maintained by the connection manager

* whenever the content of the avatar changes, the URI must change

It should have rationale and probably also examples.

Rationale for file:///: if we allowed other URI schemes (such as HTTP) we'd
have to specify which schemes clients were expected to support, and for decent
performance those clients would have to do their own caching anyway.

Rationale for not just using filenames: on Unix systems, local filenames are
arbitrary byte sequences which are not necessarily UTF-8, or even any
consistent encoding at all.

Example 1: on XMPP with XEP-0084 (PEP avatars) or XEP-0153 (vCard avatars),
avatars are announced by their SHA-1, so CM implementations could base their
filenames in the cache on that SHA-1. Similarly, in AIM/ICQ, avatars are
announced by their MD5.

Example 2: in protocols where a change to a contact's avatar is announced by a
"last updated" timestamp, CM implementations could base their filenames in the
cache on the pair (contact ID, timestamp).

(I believe at least one protocol is like Example 2, but I can't remember which
one...)

Eliminating avatar tokens might break MC's ability to set avatars nicely. We
need to be able to distinguish between these situations:

* On XMPP or something else with server-stored avatars
* Telepathy online, set avatar ":-)"
* Telepathy offline
* Pidgin online, set avatar ":-("
* Pidgin offline
* Telepathy online
* Telepathy should leave the avatar set to ":-(",
  and store it in the MC account for the future,
  overwriting ":-)"

and

* On XMPP or something else with server-stored avatars
* Telepathy online
* Telepathy offline
* Pidgin online, set avatar ":-("
* Pidgin offline
* Telepathy user sets avatar ":-)"
* Telepathy online
* Telepathy should set the avatar to ":-)",
  overwriting what Pidgin set

and

* On local-xmpp or something else without server-stored avatars
* Telepathy user sets avatar ":-)"
* Telepathy online
* Telepathy should set the avatar to ":-)"
* other clients don't matter since the avatar doesn't persist anyway

-- 
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