examinating the database for $reasons, i came over that msgs_status_updates (webxdc updates) seem not to be cleaned up when messages or chats are deleted.
looking at the source, there is a MsgId::delete_from_db() but that is not called from ChatId::delete(). not totally sure for message::delete_msgs() as that schedules jobs, however, from examination of the database, also there webxdc updates are not cleaned up.
then running SELECT COUNT(*) from msgs_status_updates WHERE msg_id NOT IN (SELECT id FROM msgs); returned 640 "forgotten" rows (of 12602 in total) - fewer than i expected as by development i use webxdc quite extensive :)
maybe we can just do the cleanup in housekeeping() as done for msgs_mdns - that would also fix the issue for existing installations and simplify the code for MsgId::delete_from_db(). i think, there are also tests missing in that code part.
examinating the database for $reasons, i came over that
msgs_status_updates
(webxdc updates) seem not to be cleaned up when messages or chats are deleted.looking at the source, there is a
MsgId::delete_from_db()
but that is not called fromChatId::delete()
. not totally sure formessage::delete_msgs()
as that schedules jobs, however, from examination of the database, also there webxdc updates are not cleaned up.then running
SELECT COUNT(*) from msgs_status_updates WHERE msg_id NOT IN (SELECT id FROM msgs);
returned 640 "forgotten" rows (of 12602 in total) - fewer than i expected as by development i use webxdc quite extensive :)maybe we can just do the cleanup in
housekeeping()
as done formsgs_mdns
- that would also fix the issue for existing installations and simplify the code forMsgId::delete_from_db()
. i think, there are also tests missing in that code part.