Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebxdcInstanceDeleted event is not emitted while deleting a chat #6670

Open
Simon-Laux opened this issue Mar 16, 2025 · 4 comments · May be fixed by #6718
Open

WebxdcInstanceDeleted event is not emitted while deleting a chat #6670

Simon-Laux opened this issue Mar 16, 2025 · 4 comments · May be fixed by #6718
Assignees
Labels
bug Something is not working webxdc

Comments

@Simon-Laux
Copy link
Contributor

Simon-Laux commented Mar 16, 2025

WebxdcInstanceDeleted event is used in desktop to delete webxdc browser data. It is not emitted when deleting a chat with webxdc instances.

I tested it on core v1.157.2.

@Simon-Laux Simon-Laux added the bug Something is not working label Mar 16, 2025
@r10s
Copy link
Contributor

r10s commented Mar 16, 2025

that's true, thanks for the pointer!

alternatively, we can document, that UI should additionally listen to ChatDeleted

emitting WebxdcInstanceDeleted will cause additional database queries on chat deletion, maybe not not too bad, but still. there was a time, where we said, that events are low-level and shall not produce additional load :)

@r10s r10s changed the title WebxdcInstanceDeleted event is not emitted while deleting a chat unclear, how UI gets aware of deleted webxdc instances when deleting a chat Mar 16, 2025
@r10s r10s changed the title unclear, how UI gets aware of deleted webxdc instances when deleting a chat WebxdcInstanceDeleted event is not emitted while deleting a chat Mar 16, 2025
@r10s
Copy link
Contributor

r10s commented Mar 16, 2025

otoh, we're doing that effort already for ephemeral messages etc, so, yes, probably reasonable to emit the event additionally as well on chat deletion, even if that means additional queries

@r10s r10s added the webxdc label Mar 16, 2025
@adbenitez
Copy link
Collaborator

adbenitez commented Mar 16, 2025

TBH it sounds unnecessary to me, if besides msgID also keep chatID of the open webxdc and listen to the chat deleted even you wouldnt need the additional event, hope firing it doesn't require go over all msgs in chat and check if some of them are webxdc

To a certain level just listening to the msgs event would probably have been enough also without the need for the "webxdc instance deleted" event but if we are going to have it anyways, it makes sense to fire it on chat deletion, otherwise it feels incomplete API

@Simon-Laux
Copy link
Contributor Author

Simon-Laux commented Mar 16, 2025

alternatively, we can document, that UI should additionally listen to ChatDeleted

I considered that first, but at least on desktop there is no easy way to find all webxdc data belonging to a chat.
Though for account deletion it is already done that way (on account deletion it deletes all webxdc data), but there each account has their own directory, so it just deletes the whole directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working webxdc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants