Initial own avatar does not trigger avatar listener
As described in this thread, the initially received own avatar is not firing registered avatar listeners.
The reason apparently is a design flaw: On one hand, the outbound listener actively downloads the avatar image from the vcard on the server, and stores it into the cache, but does not trigger and event, on the other hand, the inbound listener received the image from the server, but does wants to prevent duplicate events in case the server reports a change where actually the image does not really change.
Comments (8)
-
reporter -
repo owner - changed status to resolved
Fixes
#95→ <<cset 453e4857f3ea>>
-
repo owner Fixes
#95→ <<cset 8e28ffc5c633>>
-
repo owner I've looked into it again and noticed some inconsistent behavior here. After login, presence is sent, which causes AvatarManager to download your avatar in order to advertise it for the others. Listeners are called (for your own avatar).
But when you publish a new avatar, listeners are not called, because your own VCard is not downloaded on outbound presence.
I think we have to rework this.
-
reporter What deeper sense does it make to inform the local application about the fact that the very same application just uploaded a new avatar?
-
repo owner The same sense that the local application is informed about the own avater (even if it didn't change). As is, the avatar listener is triggered after every login.
-
reporter There is a strong difference: Nobody said that this client actually uploaded that avatar. It could have been a different computer with the same account and resource name. Possibly it was defective and was replaced, and the owner is happy to get the avatar "rescued" by the server. That makes pretty much sense. But I cannot imagine any scenario where the very same process wants to get informed about what it did itself just milliseconds before.
-
repo owner - changed status to closed
Was fixed with 0.7.3
- Log in to comment
Proposed fix contained in PR !30 (https://bitbucket.org/sco0ter/babbler/pull-requests/30).