[Bug 27269] review and clean up TplContact public API
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Jun 10 12:15:09 CEST 2010
https://bugs.freedesktop.org/show_bug.cgi?id=27269
--- Comment #16 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-06-10 03:15:08 PDT ---
(In reply to comment #13)
> Empathy log store stores the full name of the contact in the XML, along with
> the id and the avatar id. In each log entry.
>
> This means that each entry might have a different value for Alias and AvatarTok
> and is a different TplContact.
In that case, another way to model this would be to give each Entry more
"properties" (getters) in its C API, and discard the TplContact object
entirely:
* sender ID (always a contact ID)
* sender alias
* sender avatar token
* receiver ID (contact, or chatroom, or "" if MSN)
* receiver alias (or "" if not a contact?)
* receiver avatar token (or "" if not a contact)
If the IDs are the thing you have to use to understand the relation between
entries, then it seems odd to introduce another object that doesn't have the
right many:1 relationship.
> Originally I was thinking of caching avatar pics also, it's still an idea,
> since it's not the scope of libfolks caching old information.
> If I am not mistaken, currently empathy do some caching.
At the moment, neither Empathy nor telepathy-glib ever expires old avatars from
its cache, so they'll stay in ~/.cache/telepathy/avatars forever (or at least,
until deleted).
> Why keeping avatar and alias in the log entries?
> What does it happen if Cosimo changes his avatar with a funny pic and comments
> with simon his new avatar, then changes it back?
> The context of the log is not just the body, sender and receiver, but also the
> avatar or alias. That's what I call historical context.
Right, I can see the reasoning for doing this.
Note that in MSN, you can attach a nickname to a message that differs from the
nickname you want in contacts' contact lists. We now expose this in the
Messages interface as a header field, "sender-nickname".
In the long term, I think Tpl's log format should be (a serialization of) the
MessagePart[] aa{sv} from the Messages interface, and we should insert the
sender/receiver alias and avatar token into the header part if we want to keep
them (we can reserve some keys for that purpose).
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the telepathy-bugs
mailing list