TabsManager and RecentChatManager storing is broken
|Assignee:||Bartosz Brachaczek||% Done:||
|Target version:||Kadu - 0.12.1|
|Found in Git commit:||Steps to reproduce:|
|Fixed in Git commit:||9130010db97e941a07c4da5a76abe88e0a789680||Additional information:|
Restoring opened tabs and storing recent chats is broken in some circumstances.
TabsManager and RecentChatManager store Chat::uuid() in configuration and give no reason to ChatShared::shouldStore() to return true, which could mean data loss. ChatWidgetManager does the same thing, but ChatWindow stores a custom property on Chats, so by pure accident it works here.
This is really broken now. There are several possible approaches to fix it (not all are possible for 0.12.1, but we can always do a quick fix and then fix it properly in master):
1. Store some dummy custom property for such chats. I propose this fix for 0.12.1. Though, on long run it's not a good idea as it's very counter-intuitive, error-prone and hacky.
2. Add some hacks to ChatShared::shouldStore(). Main disadvantage are possibly unloaded plugins, which could otherwise want the chat to be stored, so I don't think it could work.
3. Do not allow to store Chat::uuid() by external users at all. They could use custom properties for their data. I'd go for it for 1.0 as I don't have any better ideas.
Updated by Bartosz Brachaczek 10 months ago
- Assignee set to Bartosz Brachaczek
- Priority changed from High to Regression