Bug 315939 - offline users do not have avatar
Summary: offline users do not have avatar
Status: RESOLVED FIXED
Alias: None
Product: telepathy
Classification: Frameworks and Libraries
Component: contactlist (show other bugs)
Version: git-latest
Platform: Other Linux
: NOR normal
Target Milestone: Future
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-01 08:42 UTC by Alin M Elena
Modified: 2013-03-14 12:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.6.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alin M Elena 2013-03-01 08:42:53 UTC
all my offline users do not have their usual avatar (last available when online) but the usual pawn

Alin

Reproducible: Always
Comment 1 Martin Klapetek 2013-03-01 08:57:16 UTC
Does it get lost when they go offline or when you restart the contact list?
Comment 2 Alin M Elena 2013-03-01 09:16:00 UTC
when you restart the list... 
or at least if I do this... I have show offline users on.. 
and one of my users goes offline... I can still see his avatar... I restart the cl... the pawn is there.

Alin
Comment 3 Martin Klapetek 2013-03-01 09:39:02 UTC
Are you using kpeople? Because with the new models you shouldn't have any contacts visible when you restart the list while being offline (or at least I don't, but my models may have been modified).

Otherwise it's a known bug in Telepathy, when the users are offline, the CMs(?) don't report avatars for them. This would have to be fixed upstream.
Comment 4 David Edmundson 2013-03-11 13:20:54 UTC
[13:17] <d_ed_> there are three options that I see them
[13:17] <d_ed_> 1) don't fix
[13:17] <d_ed_> 2) "metacontacts will fix this"
[13:18] <d_ed_> 3) we make the kded write out the avatarToken for a contact to the config file
[13:18] <d_ed_> 3 isn't as silly as it sounds
[13:18] <d_ed_> we already have the kded watching for new contacts coming and going.
[13:18] <d_ed_> avatarTokens are just a string ID of the avatar, it's quite lightweight
[13:19] <d_ed_> if we did this we would fix avatars in krunner/homerun when the contact is offline and we could persistently show pinned contacts in the chat applet
[13:19] <d_ed_> which I think would be a good thing to do
[13:19] <mck182> AND we already have KTp::Contact::avatar()
[13:19] <mck182> so we can just add it there
[13:19] <d_ed_> yeah.. if no avatar token we fetch it from there...
[13:19] <mck182> ok, confirm
Comment 5 Martin Klapetek 2013-03-11 19:39:55 UTC
While implementing this, I've encountered a problem with gtalk and its semi-random generated contact ids when the contact is on mobile (or using gplus gtalk too I think). Once this user goes offline, we have stored avatar path for the (seemingly?) random id, however the server returns the true id (gmail address), so there is no match and offline users still have no avatar.

At least works for other networks though.
Comment 6 Martin Klapetek 2013-03-14 12:59:25 UTC
Git commit 2cac9208c1aa26fd1666a9ac934123a7205f3310 by Martin Klapetek.
Committed on 14/03/2013 at 13:58.
Pushed by mklapetek into branch 'master'.

Store avatar tokens to use them when contact is offline

Workarounds a Tp bug/feature that returns an empty avatarToken for
offline users, so we can't display proper avatars for offline contacts
when (any) contact list is started.

REVIEW: 109432
FIXED-IN: 0.6.0

M  +44   -0    contactnotify.cpp
M  +5    -1    contactnotify.h
M  +1    -0    telepathy-module.cpp

http://commits.kde.org/telepathy-kded-module/2cac9208c1aa26fd1666a9ac934123a7205f3310