Initial own avatar does not trigger avatar listener

Issue #95 closed
Markus KARG created an issue

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)

  1. Christian Schudt 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.

  2. Markus KARG 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?

  3. Christian Schudt 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.

  4. Markus KARG 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.

  5. Log in to comment