From 2ffe55caa07d76834b09de472093f28403eba514 Mon Sep 17 00:00:00 2001 From: Phillip Date: Tue, 10 Jan 2023 16:41:27 -0500 Subject: [PATCH 1/2] fix package --- qortal-ui-plugins/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qortal-ui-plugins/package.json b/qortal-ui-plugins/package.json index 665825e1..65746f80 100644 --- a/qortal-ui-plugins/package.json +++ b/qortal-ui-plugins/package.json @@ -17,7 +17,7 @@ "author": "QORTAL ", "license": "GPL-3.0", "dependencies": { - "@lit-labs/motion": "^1.0.3", + "@lit-labs/motion": "1.0.3", "@material/mwc-list": "0.27.0", "@material/mwc-select": "0.27.0", "asmcrypto.js": "2.3.2", From 2cbe969d9d2af1a34193983d008e210fd08571b6 Mon Sep 17 00:00:00 2001 From: Justin Ferrari <‘justinwesleyferrari@gmail.com’> Date: Fri, 13 Jan 2023 16:38:39 -0500 Subject: [PATCH 2/2] Fixed forwarding bug + add group management button --- qortal-ui-core/language/us.json | 309 +++++++++--------- .../core/components/ChatGroupsManagement.js | 4 +- .../plugins/core/components/ChatPage.js | 114 +++++-- .../core/components/UserInfo/UserInfo.js | 12 +- .../core/messaging/q-chat/q-chat-css.src.js | 95 +++++- .../core/messaging/q-chat/q-chat.src.js | 56 +++- 6 files changed, 383 insertions(+), 207 deletions(-) diff --git a/qortal-ui-core/language/us.json b/qortal-ui-core/language/us.json index a293712d..9bbc4fd1 100644 --- a/qortal-ui-core/language/us.json +++ b/qortal-ui-core/language/us.json @@ -93,46 +93,46 @@ "selectfile": "Select file", "dragfile": "Drag and drop backup here" }, - "settings":{ - "generalinfo":"General Account Info", - "address":"Address", - "publickey":"Public Key", - "settings":"Settings", - "account":"Account", - "security":"Security", - "qr_login_menu_item":"QR Login", - "qr_login_description_1":"Scan this code to unlock your wallet on other device using the same password which you logged in with.", - "qr_login_description_2":"Choose a password which you will use to unlock your wallet on other device after scanning the QR code.", - "qr_login_button_1":"Show login QR code", - "qr_login_button_2":"Generate login QR code", - "notifications":"Notifications", - "accountsecurity":"Account Security", - "password":"Password", - "download":"Download Backup File", - "choose":"Please choose a password to encrypt your backup with. (This can be the same as the one you logged in with, or different)", - "block":"Block Notifications (Coming Soon...)", - "playsound":"Play Sound", - "shownotifications":"Show Notifications", - "nodeurl":"Node Url", - "nodehint":"Select a node from the default list of nodes above or add a custom node to the list above by clicking on the button below", - "addcustomnode":"Add Custom Node", - "addandsave":"Add And Save", - "protocol":"Protocol", - "domain":"Domain", - "port":"Port", - "import":"Import Nodes", - "export":"Export Nodes", - "deletecustomnode":"Remove All Custom Nodes", - "warning":"Your existing nodes will be deleted and from backup new created.", - "snack1":"Successfully deleted and added standard nodes", - "snack2":"UI conected to node", - "snack3":"Successfully added and saved custom node", - "snack4":"Nodes successfully saved as", - "snack5":"Nodes successfully imported", - "exp1":"Export Private Master Key", - "exp2":"Export Master Key", - "exp3":"Export", - "exp4":"Please choose a wallet to backup the private master key." + "settings": { + "generalinfo": "General Account Info", + "address": "Address", + "publickey": "Public Key", + "settings": "Settings", + "account": "Account", + "security": "Security", + "qr_login_menu_item": "QR Login", + "qr_login_description_1": "Scan this code to unlock your wallet on other device using the same password which you logged in with.", + "qr_login_description_2": "Choose a password which you will use to unlock your wallet on other device after scanning the QR code.", + "qr_login_button_1": "Show login QR code", + "qr_login_button_2": "Generate login QR code", + "notifications": "Notifications", + "accountsecurity": "Account Security", + "password": "Password", + "download": "Download Backup File", + "choose": "Please choose a password to encrypt your backup with. (This can be the same as the one you logged in with, or different)", + "block": "Block Notifications (Coming Soon...)", + "playsound": "Play Sound", + "shownotifications": "Show Notifications", + "nodeurl": "Node Url", + "nodehint": "Select a node from the default list of nodes above or add a custom node to the list above by clicking on the button below", + "addcustomnode": "Add Custom Node", + "addandsave": "Add And Save", + "protocol": "Protocol", + "domain": "Domain", + "port": "Port", + "import": "Import Nodes", + "export": "Export Nodes", + "deletecustomnode": "Remove All Custom Nodes", + "warning": "Your existing nodes will be deleted and from backup new created.", + "snack1": "Successfully deleted and added standard nodes", + "snack2": "UI conected to node", + "snack3": "Successfully added and saved custom node", + "snack4": "Nodes successfully saved as", + "snack5": "Nodes successfully imported", + "exp1": "Export Private Master Key", + "exp2": "Export Master Key", + "exp3": "Export", + "exp4": "Please choose a wallet to backup the private master key." }, "appinfo": { "blockheight": "Block Height", @@ -285,56 +285,56 @@ "wchange56": "WARNING!", "wchange57": "Memo" }, - "tradepage":{ - "tchange1":"Trade Portal", - "tchange2":"Select Trading Pair", - "tchange3":"HISTORIC MARKET TRADES", - "tchange4":"MY TRADE HISTORY", - "tchange5":"OPEN MARKET SELL ORDERS", - "tchange6":"MY ORDERS", - "tchange7":"Stuck Offers", - "tchange8":"Amount", - "tchange9":"Price", - "tchange10":"Total", - "tchange11":"Date", - "tchange12":"Status", - "tchange13":"Seller", - "tchange14":"Price Each", - "tchange15":"Clear Form", - "tchange16":"You have", - "tchange17":"Action", - "tchange18":"BUY", - "tchange19":"SELL", - "tchange20":"Failed to Create Trade. Try again!", - "tchange21":"Failed to Create Trade. Error Code", - "tchange22":"Insufficient Funds!", - "tchange23":"Buy Request Successful!", - "tchange24":"Buy Request Existing!", - "tchange25":"Failed to Create Trade. Error Code", - "tchange26":"Trade Cancelling In Progress!", - "tchange27":"Failed to Cancel Trade. Try again!", - "tchange28":"Failed to Cancel Trade. Error Code", - "tchange29":"CANCEL", - "tchange30":"Failed to Fetch Balance. Try again!", - "tchange31":"SOLD", - "tchange32":"BOUGHT", - "tchange33":"Average", - "tchange34":"Amount can not be 0", - "tchange35":"Price can not be 0", - "tchange36":"PENDING AUTO BUY", - "tchange37":"No auto buy order found !", - "tchange38":"ADD", - "tchange39":"AUTO BUY ORDER", - "tchange40":"Price", - "tchange41":"Successfully removed auto buy order!", - "tchange42":"MARKET OPEN SELL ORDERS", - "tchange43":"MY BUY HISTORY", - "tchange44":"Successfully added auto buy order!", - "tchange45":"AUTO BUY WITH", - "tchange46":"AUTO BUY", - "tchange47":"Sell for this price", - "tchange48":"NOT ENOUGH", - "tchange49":"Price Chart" + "tradepage": { + "tchange1": "Trade Portal", + "tchange2": "Select Trading Pair", + "tchange3": "HISTORIC MARKET TRADES", + "tchange4": "MY TRADE HISTORY", + "tchange5": "OPEN MARKET SELL ORDERS", + "tchange6": "MY ORDERS", + "tchange7": "Stuck Offers", + "tchange8": "Amount", + "tchange9": "Price", + "tchange10": "Total", + "tchange11": "Date", + "tchange12": "Status", + "tchange13": "Seller", + "tchange14": "Price Each", + "tchange15": "Clear Form", + "tchange16": "You have", + "tchange17": "Action", + "tchange18": "BUY", + "tchange19": "SELL", + "tchange20": "Failed to Create Trade. Try again!", + "tchange21": "Failed to Create Trade. Error Code", + "tchange22": "Insufficient Funds!", + "tchange23": "Buy Request Successful!", + "tchange24": "Buy Request Existing!", + "tchange25": "Failed to Create Trade. Error Code", + "tchange26": "Trade Cancelling In Progress!", + "tchange27": "Failed to Cancel Trade. Try again!", + "tchange28": "Failed to Cancel Trade. Error Code", + "tchange29": "CANCEL", + "tchange30": "Failed to Fetch Balance. Try again!", + "tchange31": "SOLD", + "tchange32": "BOUGHT", + "tchange33": "Average", + "tchange34": "Amount can not be 0", + "tchange35": "Price can not be 0", + "tchange36": "PENDING AUTO BUY", + "tchange37": "No auto buy order found !", + "tchange38": "ADD", + "tchange39": "AUTO BUY ORDER", + "tchange40": "Price", + "tchange41": "Successfully removed auto buy order!", + "tchange42": "MARKET OPEN SELL ORDERS", + "tchange43": "MY BUY HISTORY", + "tchange44": "Successfully added auto buy order!", + "tchange45": "AUTO BUY WITH", + "tchange46": "AUTO BUY", + "tchange47": "Sell for this price", + "tchange48": "NOT ENOUGH", + "tchange49": "Price Chart" }, "rewardsharepage": { "rchange1": "Rewardshares", @@ -565,7 +565,10 @@ "cchange56": "Transaction Failed!", "cchange57": "User Info", "cchange58": "SEND MESSAGE", - "cchange59": "TIP USER" + "cchange59": "TIP USER", + "cchange60": "Group Invites Pending", + "cchange61": "Error when fetching group invites. Please try again!", + "cchange62": "Wrong Username and Address Inputted! Please try again!" }, "welcomepage": { "wcchange1": "Welcome to Q-Chat", @@ -792,67 +795,67 @@ "exp20": "Received", "exp21": "Trades" }, - "managegroup":{ - "mg1":"Group Members", - "mg2":"Invite To Group", - "mg3":"Group Admins", - "mg4":"Update Group", - "mg5":"Close Manage Group", - "mg6":"BAN", - "mg7":"KICK", - "mg8":"Group ID", - "mg9":"Joined", - "mg10":"Add Group Admin", - "mg11":"Are you sure to add this member to admins ?", - "mg12":"On pressing confirm, add admin request will be sent!", - "mg13":"Remove Group Admin", - "mg14":"Remove Admin Address", - "mg15":"Are you sure to remove this member from admins ?", - "mg16":"On pressing confirm, remove admin request will be sent!", - "mg17":"Ban Member From Group", - "mg18":"Member Name", - "mg19":"Member Address", - "mg20":"How Long To Ban", - "mg21":"Reason For Ban", - "mg22":"Are you sure to ban this member from the group ?", - "mg23":"On pressing confirm, the ban request will be sent!", - "mg24":"FOREVER", - "mg25":"Banned Members", - "mg26":"CANCEL BAN", - "mg27":"Ban Expiry", - "mg28":"Cancel Ban Member From Group", - "mg29":"Are you sure to cancel the ban for this member from the group ?", - "mg30":"On pressing confirm, the cancel ban request will be sent!", - "mg31":"Kick Member From Group", - "mg32":"Reason For Kick", - "mg33":"Are you sure to kick this member from the group ?", - "mg34":"On pressing confirm, the kick request will be sent!", - "mg35":"No Open Group Invites", - "mg36":"Your Open Group Invites", - "mg37":"Address or name to invite", - "mg38":"Invite Expiry Time", - "mg39":"All Fields Are Required", - "mg40":"Are you sure to invite this member to the group ?", - "mg41":"On pressing confirm, the invite request will be sent!", - "mg42":"Group Type", - "mg43":"Invite Expiry", - "mg44":"Public Group", - "mg45":"Private Group", - "mg46":"Cancel Invite", - "mg47":"Cancel Invite To Group", - "mg48":"Are you sure to cancel the invite for this member ?", - "mg49":"On pressing confirm, the cancel invite request will be sent!", - "mg50":"Coming Soon...", - "mg51":"Minimum 3 Characters / Maximum 32 Characters", - "mg52":"Maximum 128 Characters", - "mg53":"Your Open Join Requests", - "mg54":"No Open Join Requests", - "mg55":"Are you sure to accept the join request from this member ?", - "mg56":"On pressing confirm, the accept join request will be sent!", - "mg57":"Join Request Successfully Accepted", - "mg58":"SOMETHING WENT WRONG", - "mg59":"Cancel Join Request Successfully Accepted", - "mg60":"Are you sure to cancel the join request from this member ?", - "mg61":"On pressing confirm, the cancel join request will be sent!" + "managegroup": { + "mg1": "Group Members", + "mg2": "Invite To Group", + "mg3": "Group Admins", + "mg4": "Update Group", + "mg5": "Close Manage Group", + "mg6": "BAN", + "mg7": "KICK", + "mg8": "Group ID", + "mg9": "Joined", + "mg10": "Add Group Admin", + "mg11": "Are you sure to add this member to admins ?", + "mg12": "On pressing confirm, add admin request will be sent!", + "mg13": "Remove Group Admin", + "mg14": "Remove Admin Address", + "mg15": "Are you sure to remove this member from admins ?", + "mg16": "On pressing confirm, remove admin request will be sent!", + "mg17": "Ban Member From Group", + "mg18": "Member Name", + "mg19": "Member Address", + "mg20": "How Long To Ban", + "mg21": "Reason For Ban", + "mg22": "Are you sure to ban this member from the group ?", + "mg23": "On pressing confirm, the ban request will be sent!", + "mg24": "FOREVER", + "mg25": "Banned Members", + "mg26": "CANCEL BAN", + "mg27": "Ban Expiry", + "mg28": "Cancel Ban Member From Group", + "mg29": "Are you sure to cancel the ban for this member from the group ?", + "mg30": "On pressing confirm, the cancel ban request will be sent!", + "mg31": "Kick Member From Group", + "mg32": "Reason For Kick", + "mg33": "Are you sure to kick this member from the group ?", + "mg34": "On pressing confirm, the kick request will be sent!", + "mg35": "No Open Group Invites", + "mg36": "Your Open Group Invites", + "mg37": "Address or name to invite", + "mg38": "Invite Expiry Time", + "mg39": "All Fields Are Required", + "mg40": "Are you sure to invite this member to the group ?", + "mg41": "On pressing confirm, the invite request will be sent!", + "mg42": "Group Type", + "mg43": "Invite Expiry", + "mg44": "Public Group", + "mg45": "Private Group", + "mg46": "Cancel Invite", + "mg47": "Cancel Invite To Group", + "mg48": "Are you sure to cancel the invite for this member ?", + "mg49": "On pressing confirm, the cancel invite request will be sent!", + "mg50": "Coming Soon...", + "mg51": "Minimum 3 Characters / Maximum 32 Characters", + "mg52": "Maximum 128 Characters", + "mg53": "Your Open Join Requests", + "mg54": "No Open Join Requests", + "mg55": "Are you sure to accept the join request from this member ?", + "mg56": "On pressing confirm, the accept join request will be sent!", + "mg57": "Join Request Successfully Accepted", + "mg58": "SOMETHING WENT WRONG", + "mg59": "Cancel Join Request Successfully Accepted", + "mg60": "Are you sure to cancel the join request from this member ?", + "mg61": "On pressing confirm, the cancel join request will be sent!" } } \ No newline at end of file diff --git a/qortal-ui-plugins/plugins/core/components/ChatGroupsManagement.js b/qortal-ui-plugins/plugins/core/components/ChatGroupsManagement.js index 029a31b7..a6950b77 100644 --- a/qortal-ui-plugins/plugins/core/components/ChatGroupsManagement.js +++ b/qortal-ui-plugins/plugins/core/components/ChatGroupsManagement.js @@ -229,9 +229,9 @@ class ChatGroupsManagement extends LitElement { render() { return html` - { + { diff --git a/qortal-ui-plugins/plugins/core/components/ChatPage.js b/qortal-ui-plugins/plugins/core/components/ChatPage.js index 97ff9f15..bf3bc2ab 100644 --- a/qortal-ui-plugins/plugins/core/components/ChatPage.js +++ b/qortal-ui-plugins/plugins/core/components/ChatPage.js @@ -1061,8 +1061,10 @@ class ChatPage extends LitElement { id="sendTo" placeholder="${translate("chatpage.cchange7")}" @keydown=${() => { - this.forwardActiveChatHeadUrl = {}; - this.requestUpdate(); + if (this.forwardActiveChatHeadUrl.selected) { + this.forwardActiveChatHeadUrl = {}; + this.requestUpdate(); + } } } /> @@ -1234,7 +1236,8 @@ class ChatPage extends LitElement { const nameValue = this.shadowRoot.getElementById('sendTo').value; if (!nameValue) { this.userFound = []; - this.userFoundModalOpen = true; + this.userFoundModalOpen = false; + this.loading = false; return; } try { @@ -1244,6 +1247,7 @@ class ChatPage extends LitElement { }) if (result.error === 401) { this.userFound = []; + this.loading = false; } else { this.userFound = [ ...this.userFound, @@ -1252,6 +1256,7 @@ class ChatPage extends LitElement { } this.userFoundModalOpen = true; } catch (error) { + this.loading = false; console.error(error); let err4string = get("chatpage.cchange35"); parentEpml.request('showSnackBar', `${err4string}`) @@ -1479,23 +1484,23 @@ class ChatPage extends LitElement { } } -async getName (recipient) { - try { - const getNames = await parentEpml.request("apiCall", { - type: "api", - url: `/names/address/${recipient}`, - }); + async getName (recipient) { + try { + const getNames = await parentEpml.request("apiCall", { + type: "api", + url: `/names/address/${recipient}`, + }); - if (Array.isArray(getNames) && getNames.length > 0 ) { - return getNames[0].name - } else { - return '' + if (Array.isArray(getNames) && getNames.length > 0 ) { + return getNames[0].name + } else { + return '' + } + + } catch (error) { + return "" } - - } catch (error) { - return "" } -} async renderPlaceholder() { const getName = async (recipient)=> { @@ -2403,9 +2408,9 @@ async getName (recipient) { }; if (this.forwardActiveChatHeadUrl.url) { - const activeChatHeadAddress = this.forwardActiveChatHeadUrl.url.split('/')[1] + const activeChatHeadAddress = this.forwardActiveChatHeadUrl.url.split('/')[1]; try { - const res = await parentEpml.request('apiCall', { + const res = await parentEpml.request('apiCall', { type: 'api', url: `/addresses/publickey/${activeChatHeadAddress}` }) @@ -2425,21 +2430,58 @@ async getName (recipient) { } } - if (!this.forwardActiveChatHeadUrl && this.shadowRoot.getElementById("sendTo").value !== "") { + if (!this.forwardActiveChatHeadUrl.selected && this.shadowRoot.getElementById("sendTo").value !== "") { + const userInput = this.shadowRoot.getElementById("sendTo").value.trim(); try { - const res = await parentEpml.request('apiCall', { + let userPubkey = ""; + const validatedAddress = await parentEpml.request('apiCall', { type: 'api', - url: `/addresses/publickey/${this.shadowRoot.getElementById("sendTo").value}` - }) - if (res.error === 102) { - publicKey.key = '' - publicKey.hasPubKey = false - } else if (res !== false) { - publicKey.key = res - publicKey.hasPubKey = true + url: `/addresses/validate/${userInput}` + }); + + const validatedUsername = await parentEpml.request('apiCall', { + type: 'api', + url: `/names/${userInput}` + }); + + if (!validatedAddress && validatedUsername) { + userPubkey = await parentEpml.request('apiCall', { + type: 'api', + url: `/addresses/publickey/${validatedUsername.owner}` + }); + this.forwardActiveChatHeadUrl = { + ...this.forwardActiveChatHeadUrl, + url: `direct/${validatedUsername.owner}`, + name: validatedUsername.name, + selected: true + }; + } else if (validatedAddress && !validatedUsername.name) { + userPubkey = await parentEpml.request('apiCall', { + type: 'api', + url: `/addresses/publickey/${userInput}` + }); + this.forwardActiveChatHeadUrl = { + ...this.forwardActiveChatHeadUrl, + url: `direct/${userInput}`, + name: "", + selected: true + }; + } else if (!validatedAddress && !validatedUsername.name) { + let err4string = get("chatpage.cchange62"); + parentEpml.request('showSnackBar', `${err4string}`); + getSendChatResponse(false); + return; + } + + if (userPubkey.error === 102) { + publicKey.key = ''; + publicKey.hasPubKey = false; + } else if (userPubkey !== false) { + publicKey.key = userPubkey; + publicKey.hasPubKey = true; } else { - publicKey.key = '' - publicKey.hasPubKey = false + publicKey.key = ''; + publicKey.hasPubKey = false; } } catch (error) { console.error(error); @@ -2454,9 +2496,9 @@ async getName (recipient) { if (isRecipient === true) { if(!publicKey.hasPubKey){ let err4string = get("chatpage.cchange39"); - parentEpml.request('showSnackBar', `${err4string}`) - getSendChatResponse(false) - return + parentEpml.request('showSnackBar', `${err4string}`); + getSendChatResponse(false); + return; } let chatResponse = await parentEpml.request('chat', { type: 18, @@ -2536,7 +2578,7 @@ async getName (recipient) { if (response === true) { this.chatEditor.resetValue(); this.chatEditorNewChat.resetValue() - if(isForward){ + if (isForward) { let successString = get("blockpage.bcchange15"); parentEpml.request('showSnackBar', `${successString}`); } @@ -2545,6 +2587,8 @@ async getName (recipient) { } else { let err2string = get("chatpage.cchange21"); parentEpml.request('showSnackBar', `${err2string}`); + this.forwardActiveChatHeadUrl = {}; + this.shadowRoot.getElementById("sendTo").value = ""; } this.isLoading = false; diff --git a/qortal-ui-plugins/plugins/core/components/UserInfo/UserInfo.js b/qortal-ui-plugins/plugins/core/components/UserInfo/UserInfo.js index c31b4515..99468a92 100644 --- a/qortal-ui-plugins/plugins/core/components/UserInfo/UserInfo.js +++ b/qortal-ui-plugins/plugins/core/components/UserInfo/UserInfo.js @@ -62,7 +62,7 @@ export class UserInfo extends LitElement { render() { let avatarImg = ""; - if (this.selectedHead.name) { + if (this.selectedHead && this.selectedHead.name) { const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]; const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port; const avatarUrl = `${nodeUrl}/arbitrary/THUMBNAIL/${this.selectedHead.name}/qortal_avatar?async=true&apiKey=${myNode.apiKey}`; @@ -85,7 +85,7 @@ export class UserInfo extends LitElement { ${avatarImg} ` : html``} - ${!this.isImageLoaded && this.selectedHead.name ? + ${!this.isImageLoaded && this.selectedHead && this.selectedHead.name ? html`
` : ""} - ${!this.isImageLoaded && !this.selectedHead.name ? + ${!this.isImageLoaded && this.selectedHead && !this.selectedHead.name ? html` -
+
avatar
` : ""}
-
- this.shadowRoot.querySelector('#blockedUserDialog').show()}> +
+ + + + ${this.groupInvites.length > 0 ? ( + html` +
+ ${this.groupInvites.length} +
+
+ ${this.groupInvites.length} ${translate("chatpage.cchange60")} +
+ ` + ) : null}
+ this.shadowRoot.querySelector('#blockedUserDialog').show()}> +
@@ -271,11 +294,12 @@ class Chat extends LitElement { ` } - firstUpdated() { - this.changeLanguage() - this.changeTheme() - this.getChatBlockedList() - this.getLocalBlockedList() + async firstUpdated() { + this.changeLanguage(); + this.changeTheme(); + this.getChatBlockedList(); + this.getLocalBlockedList(); + await this.getPendingGroupInvites(); const getBlockedUsers = async () => { let blockedUsers = await parentEpml.request('apiCall', { @@ -672,6 +696,20 @@ class Chat extends LitElement { }) } + async getPendingGroupInvites() { + const myAddress = window.parent.reduxStore.getState().app.selectedAddress.address + try { + let pendingGroupInvites = await parentEpml.request('apiCall', { + url: `/groups/invites/${myAddress}` + }) + this.groupInvites = pendingGroupInvites; + } catch (error) { + console.error(error); + let err4string = get("chatpage.cchange61"); + parentEpml.request('showSnackBar', `${err4string}`) + } + } + async unblockUser(websiteObj) { let owner = websiteObj.owner