mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-17 08:44:20 +01:00
When decks_cache.json was saved with the old format, relay URLs like "wss://wot.nostr.net" were split by the ":" delimiter into separate tokens: ["wss", "//wot.nostr.net"]. This commit adds migration logic to detect and reconstruct these corrupted URLs during parsing. Detection heuristic: - If the relay_url token is just "wss" or "ws" (without "://") - AND the next token (hashtags_str) starts with "//" - Then reconstruct the full URL as "wss://..." or "ws://..." - And pull the next token as the actual hashtags This allows existing users with corrupted decks_cache.json files to automatically have their relay URLs fixed on next app restart, without needing to manually delete the cache file.