Skip to content

feat: Remove webxdc info messages together with webxdc #7021

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Septias
Copy link
Collaborator

@Septias Septias commented Jul 20, 2025

This PR adds the feature that webxdc info messages belonging to a wexbdc are deleted when the webxdc is deleted. This is implemented by checking every deleted message whether it has referencing messages with the SystemMessage WebxdcInfoMsg. These messages are then deleted locally, and a delete request is sent out to chat peers. Deletion could also be implemented on the receiving side of a webxdc delete, but with the current implementation, the code is nice and concise and in one place.

close #6999

Septias added 2 commits July 20, 2025 22:30
This allocates a vector of size #messagesToDelete which should be no
problem.
@Septias Septias force-pushed the sk/delete_wexbdc_instance_messages branch 2 times, most recently from 780a3e9 to 35dc5d9 Compare July 24, 2025 12:34
@Septias Septias marked this pull request as ready for review July 24, 2025 12:34
@Septias Septias requested review from Hocuri, iequidoo and link2xt and removed request for Hocuri July 24, 2025 13:02
@Hocuri
Copy link
Collaborator

Hocuri commented Jul 24, 2025

Did you test whether this actually works on a real device (DC Android/Desktop)?

Because @adbenitez commented:

they have different IDs per device so deleting in one device doesn't delete for everyone nor even for your oder devices, so you have to delete several info message manually from every device

@Septias
Copy link
Collaborator Author

Septias commented Jul 24, 2025

No, I have to test it on a real device. But rfc724 mid should be be the same across devices, no?

@Septias Septias marked this pull request as draft July 24, 2025 13:43
@Septias Septias removed request for iequidoo and link2xt July 24, 2025 13:46
@Septias Septias force-pushed the sk/delete_wexbdc_instance_messages branch from 6da6bd9 to 969da38 Compare July 24, 2025 14:05
@r10s
Copy link
Contributor

r10s commented Jul 24, 2025

No, I have to test it on a real device.

that should be done, building desktop is comparable easy - and testing multi device should be possible by ex-/importing a backup

But rfc724 mid should be be the same across devices, no?

no. seems they're generated locally and are different on devices. at least this is what i read from the webxdc.rs code at a first glance, reading for 30 seconds :)

not saying the PR is not working, however, only answering the question :) as said, testing makes sense here

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.

Delete Webxdc infomessages when webxdc is deleted
3 participants