mirror of
https://github.com/status-im/status-react.git
synced 2025-01-11 11:34:45 +00:00
delete any open chats with removed default contacts; remove etherplay and commiteth
This commit is contained in:
parent
18ca23accc
commit
a6f9eb6cea
@ -248,37 +248,8 @@
|
|||||||
},
|
},
|
||||||
"groups": ["dapps"],
|
"groups": ["dapps"],
|
||||||
"description": "The future of work is now. Hire people or work yourself in return for ETH."
|
"description": "The future of work is now. Hire people or work yourself in return for ETH."
|
||||||
},
|
|
||||||
|
|
||||||
"Commiteth":
|
|
||||||
{
|
|
||||||
"name":
|
|
||||||
{
|
|
||||||
"en": "Commiteth"
|
|
||||||
},
|
|
||||||
"photo-path": "contacts://commiteth",
|
|
||||||
"dapp?": true,
|
|
||||||
"dapp-url":
|
|
||||||
{
|
|
||||||
"en": "https://commiteth.com"
|
|
||||||
},
|
|
||||||
"groups": ["dapps"],
|
|
||||||
"description": "CommitETH is a GitHub bounty bot that incentivizes pull request submissions by attaching ETH or any ERC20-compatible token to open issues in GitHub."
|
|
||||||
},
|
|
||||||
|
|
||||||
"Etherplay":
|
|
||||||
{
|
|
||||||
"name":
|
|
||||||
{
|
|
||||||
"en": "Etherplay"
|
|
||||||
},
|
|
||||||
"photo-path": "contacts://etherplay",
|
|
||||||
"dapp?": true,
|
|
||||||
"dapp-url":
|
|
||||||
{
|
|
||||||
"en": "http://test.etherplay.io"
|
|
||||||
},
|
|
||||||
"groups": ["dapps"],
|
|
||||||
"description": "A transparent skill game platform. Play games and win ETH!"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,21 @@
|
|||||||
local-storage/schema
|
local-storage/schema
|
||||||
handler-data/schema])
|
handler-data/schema])
|
||||||
|
|
||||||
|
|
||||||
|
(defn remove-chat-with-contact! [new-realm whisper-identity]
|
||||||
|
(when-let [chat-contact (some-> new-realm
|
||||||
|
(.objects "chat-contact")
|
||||||
|
(.filtered (str "identity = \"" whisper-identity "\""))
|
||||||
|
(aget 0))]
|
||||||
|
(log/debug "v17 Removing chat-contact with contact" (pr-str chat-contact))
|
||||||
|
(.delete new-realm chat-contact))
|
||||||
|
(when-let [chat (some-> new-realm
|
||||||
|
(.objects "chat")
|
||||||
|
(.filtered (str "chat-id = \"" whisper-identity "\""))
|
||||||
|
(aget 0))]
|
||||||
|
(log/debug "v17 Removing chat with contact" (pr-str chat))
|
||||||
|
(.delete new-realm chat)))
|
||||||
|
|
||||||
(defn remove-contact! [new-realm whisper-identity]
|
(defn remove-contact! [new-realm whisper-identity]
|
||||||
(when-let [contact (some-> new-realm
|
(when-let [contact (some-> new-realm
|
||||||
(.objects "contact")
|
(.objects "contact")
|
||||||
@ -69,7 +84,8 @@
|
|||||||
;; NOTE(oskarth): Resets Realm for some dApps to be loaded by default_contacts.json instead.
|
;; NOTE(oskarth): Resets Realm for some dApps to be loaded by default_contacts.json instead.
|
||||||
(defn migration [old-realm new-realm]
|
(defn migration [old-realm new-realm]
|
||||||
(log/debug "migrating v17 account database: " old-realm new-realm)
|
(log/debug "migrating v17 account database: " old-realm new-realm)
|
||||||
(doseq [contact ["oaken-water-meter" "gnosis" "Commiteth" "melonport"]]
|
(doseq [contact-id ["oaken-water-meter" "gnosis" "Commiteth" "melonport" "Etherplay"]]
|
||||||
(remove-contact! new-realm contact))
|
(remove-chat-with-contact! new-realm contact-id)
|
||||||
|
(remove-contact! new-realm contact-id))
|
||||||
(update-commands new-realm "command")
|
(update-commands new-realm "command")
|
||||||
(update-commands new-realm "command-request"))
|
(update-commands new-realm "command-request"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user