Skip to content

Do not emit avatar on presence errors - #511

Merged
legastero merged 1 commit into
legastero:masterfrom
agnauck:vcard-avatar-fix
Feb 6, 2026
Merged

legastero merged 1 commit into
legastero:masterfrom
agnauck:vcard-avatar-fix

Conversation

@agnauck

@agnauck agnauck commented Feb 6, 2026 •

Copy link
Copy Markdown
Contributor

Description:

avatar events are emitted also for error presences that contain vcard avatar info. Those error presences are often just remote timeouts. Or stale contacts where the server does not exist anymore.

In those cases I get back my own presence that raises an avatar event with my own avatar hash, but the bare Jid of a contact. This can force clients to apply your own avatar to contacts.

I think error presences should not emit the avatar. Or is there a better way to handle this?

Fix

Just ignore error presences in the vcard avatar code

@agnauck

agnauck commented Feb 6, 2026

Copy link
Copy Markdown
Contributor Author

build fails, but I think this is not relates to this PR and some other problem

@legastero

Copy link
Copy Markdown
Owner

Thanks! I'll take care of any build issues

@legastero
legastero merged commit 608afa4 into legastero:master Feb 6, 2026
0 of 5 checks passed
@legastero

Copy link
Copy Markdown
Owner

Published as 12.21.1, with some updated dependencies to catch up on JS tooling changes.

@agnauck

agnauck commented Feb 6, 2026

Copy link
Copy Markdown
Contributor Author

thanks again for your super fast merge 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants