fix wallet contact migration

This commit is contained in:
Roman Volosovskyi 2017-10-25 11:18:12 +02:00
parent 21a80d71ad
commit 8b2fa695af
1 changed files with 4 additions and 1 deletions

View File

@ -64,7 +64,10 @@
(log/debug "migrating v16 account database: " old-realm new-realm)
(when-let [wallet-chat (chat-by-id new-realm "wallet")]
(.delete new-realm wallet-chat))
(when-let [wallet-contact (chat-by-id new-realm "wallet")]
(when-let [wallet-contact (some-> new-realm
(.objects "contact")
(.filtered (str "whisper-identity = \"wallet\""))
(aget 0))]
(.delete new-realm wallet-contact))
(migrate-commands new-realm "command-request")
(migrate-commands new-realm "command"))