2021-12-31 12:29:51 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property var contactsModule
|
|
|
|
|
|
|
|
property var globalUtilsInst: globalUtils
|
|
|
|
property var mainModuleInst: mainModule
|
|
|
|
|
|
|
|
property string myPublicKey: userProfile.pubKey
|
|
|
|
|
2022-03-24 20:55:22 +00:00
|
|
|
property var myContactsModel: contactsModule.myMutualContactsModel
|
|
|
|
property var blockedContactsModel: contactsModule.blockedContactsModel
|
|
|
|
property var receivedContactRequestsModel: contactsModule.receivedContactRequestsModel
|
|
|
|
property var sentContactRequestsModel: contactsModule.sentContactRequestsModel
|
2022-04-08 20:17:16 +00:00
|
|
|
|
|
|
|
// Temporary commented until we provide appropriate flags on the `status-go` side to cover all sections.
|
|
|
|
// property var receivedButRejectedContactRequestsModel: contactsModule.receivedButRejectedContactRequestsModel
|
|
|
|
// property var sentButRejectedContactRequestsModel: contactsModule.sentButRejectedContactRequestsModel
|
2022-03-15 15:55:18 +00:00
|
|
|
|
2022-01-04 12:06:05 +00:00
|
|
|
function resolveENS(value) {
|
|
|
|
root.mainModuleInst.resolveENS(value, "")
|
2021-12-31 12:29:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function generateAlias(pubKey) {
|
|
|
|
return root.globalUtilsInst.generateAlias(pubKey)
|
|
|
|
}
|
|
|
|
|
2022-03-28 14:42:26 +00:00
|
|
|
function getFromClipboard() {
|
|
|
|
return root.globalUtilsInst.getFromClipboard()
|
|
|
|
}
|
|
|
|
|
2022-03-25 11:33:30 +00:00
|
|
|
function isMyMutualContact(pubKey) {
|
|
|
|
return root.contactsModule.isMyMutualContact(pubKey)
|
|
|
|
}
|
|
|
|
|
2022-06-20 14:48:38 +00:00
|
|
|
function isBlockedContact(pubKey) {
|
|
|
|
return root.contactsModule.isBlockedContact(pubKey)
|
|
|
|
}
|
|
|
|
|
|
|
|
function hasPendingContactRequest(pubKey) {
|
|
|
|
return root.contactsModule.hasPendingContactRequest(pubKey)
|
|
|
|
}
|
|
|
|
|
2021-12-31 12:29:51 +00:00
|
|
|
function joinPrivateChat(pubKey) {
|
|
|
|
Global.changeAppSectionBySectionType(Constants.appSection.chat)
|
2022-05-17 08:06:21 +00:00
|
|
|
root.contactsModule.switchToOrCreateOneToOneChat(pubKey)
|
2021-12-31 12:29:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function unblockContact(pubKey) {
|
|
|
|
root.contactsModule.unblockContact(pubKey)
|
|
|
|
}
|
|
|
|
|
|
|
|
function blockContact(pubKey) {
|
|
|
|
root.contactsModule.blockContact(pubKey)
|
|
|
|
}
|
|
|
|
|
|
|
|
function removeContact(pubKey) {
|
|
|
|
root.contactsModule.removeContact(pubKey)
|
|
|
|
}
|
|
|
|
|
|
|
|
function changeContactNickname(pubKey, nickname) {
|
|
|
|
root.contactsModule.changeContactNickname(pubKey, nickname)
|
|
|
|
}
|
2022-05-27 08:57:18 +00:00
|
|
|
|
|
|
|
function sendContactRequest(pubKey, message) {
|
|
|
|
root.contactsModule.sendContactRequest(pubKey, message)
|
|
|
|
}
|
|
|
|
|
2022-03-15 15:55:18 +00:00
|
|
|
function acceptContactRequest(pubKey) {
|
2022-05-27 08:57:18 +00:00
|
|
|
root.contactsModule.acceptContactRequest(pubKey)
|
2022-03-15 15:55:18 +00:00
|
|
|
}
|
|
|
|
|
2022-05-27 08:57:18 +00:00
|
|
|
function dismissContactRequest(pubKey) {
|
|
|
|
root.contactsModule.dismissContactRequest(pubKey)
|
2022-03-15 15:55:18 +00:00
|
|
|
}
|
|
|
|
|
2022-03-24 20:55:22 +00:00
|
|
|
function removeContactRequestRejection(pubKey) {
|
|
|
|
root.contactsModule.removeContactRequestRejection(pubKey)
|
2022-03-15 15:55:18 +00:00
|
|
|
}
|
2022-06-28 18:11:18 +00:00
|
|
|
|
|
|
|
function markUntrustworthy(pubKey) {
|
|
|
|
root.contactsModule.markUntrustworthy(pubKey)
|
|
|
|
}
|
|
|
|
|
|
|
|
function removeTrustStatus(pubKey) {
|
|
|
|
root.contactsModule.removeTrustStatus(pubKey)
|
|
|
|
}
|
|
|
|
|
|
|
|
function sendVerificationRequest(pubKey, challenge) {
|
|
|
|
root.contactsModule.sendVerificationRequest(pubKey, challenge);
|
|
|
|
}
|
|
|
|
|
|
|
|
function cancelVerificationRequest(pubKey) {
|
|
|
|
root.contactsModule.cancelVerificationRequest(pubKey);
|
|
|
|
}
|
|
|
|
|
|
|
|
function declineVerificationRequest(pubKey) {
|
|
|
|
root.contactsModule.declineVerificationRequest(pubKey);
|
|
|
|
}
|
|
|
|
|
|
|
|
function acceptVerificationRequest(pubKey, response) {
|
|
|
|
root.contactsModule.acceptVerificationRequest(pubKey, response);
|
|
|
|
}
|
|
|
|
|
|
|
|
function getVerificationDetailsFromAsJson(pubKey) {
|
|
|
|
let resp = root.contactsModule.getVerificationDetailsFromAsJson(pubKey);
|
|
|
|
return JSON.parse(resp);
|
|
|
|
}
|
|
|
|
|
|
|
|
function getSentVerificationDetailsAsJson(pubKey) {
|
|
|
|
let resp = root.contactsModule.getSentVerificationDetailsAsJson(pubKey);
|
|
|
|
return JSON.parse(resp);
|
|
|
|
}
|
|
|
|
|
|
|
|
function hasReceivedVerificationRequestFrom(pubKey) {
|
|
|
|
return root.contactsModule.hasReceivedVerificationRequestFrom(pubKey);
|
|
|
|
}
|
|
|
|
|
|
|
|
function verifiedTrusted(pubKey) {
|
|
|
|
root.contactsModule.verifiedTrusted(pubKey);
|
|
|
|
}
|
|
|
|
|
|
|
|
function verifiedUntrustworthy(pubKey) {
|
|
|
|
root.contactsModule.verifiedUntrustworthy(pubKey);
|
|
|
|
}
|
2021-12-31 12:29:51 +00:00
|
|
|
}
|