fix(contacts): Fix new url format validation in contact request dialog from settings

Fixes: #12829
This commit is contained in:
Boris Melnik 2023-11-28 18:07:31 +03:00
parent 34097f9dea
commit 82a829de0c
1 changed files with 9 additions and 0 deletions

View File

@ -44,6 +44,15 @@ StatusModal {
})
function textChanged(text) {
const urlContactData = Utils.parseContactUrl(text)
if (urlContactData) {
// Ignore all the data from the link, because it might be malformed.
// Except for the publicKey.
d.realChatKey = urlContactData.publicKey
Qt.callLater(d.lookupContact, urlContactData.publicKey);
return
}
d.resolvedPubKey = ""
d.realChatKey = text