mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-04-23 19:37:52 +00:00
increase timeout
This commit is contained in:
parent
24d681bf70
commit
e5292e5108
@ -251,7 +251,7 @@ const sendChatDirect = async ({ chatReference = undefined, messageText, otherDat
|
|||||||
otherData,
|
otherData,
|
||||||
publicKeyOfRecipient,
|
publicKeyOfRecipient,
|
||||||
address: directTo,
|
address: directTo,
|
||||||
})
|
}, 120000)
|
||||||
.then(async (response) => {
|
.then(async (response) => {
|
||||||
if (!response?.error) {
|
if (!response?.error) {
|
||||||
if (isNewChatVar) {
|
if (isNewChatVar) {
|
||||||
@ -342,7 +342,7 @@ const clearEditorContent = () => {
|
|||||||
repliedTo
|
repliedTo
|
||||||
}
|
}
|
||||||
const sendMessageFunc = async () => {
|
const sendMessageFunc = async () => {
|
||||||
await sendChatDirect({ chatReference: undefined, messageText: htmlContent, otherData}, selectedDirect?.address, publicKeyOfRecipient, false)
|
return await sendChatDirect({ chatReference: undefined, messageText: htmlContent, otherData}, selectedDirect?.address, publicKeyOfRecipient, false)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -496,7 +496,7 @@ const sendChatGroup = async ({groupId, typeMessage = undefined, chatReference =
|
|||||||
typeMessage,
|
typeMessage,
|
||||||
chatReference,
|
chatReference,
|
||||||
messageText,
|
messageText,
|
||||||
})
|
}, 120000)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
if (!response?.error) {
|
if (!response?.error) {
|
||||||
res(response);
|
res(response);
|
||||||
@ -562,7 +562,7 @@ const clearEditorContent = () => {
|
|||||||
// const res = await sendChatGroup({groupId: selectedGroup,messageText: encryptSingle})
|
// const res = await sendChatGroup({groupId: selectedGroup,messageText: encryptSingle})
|
||||||
|
|
||||||
const sendMessageFunc = async () => {
|
const sendMessageFunc = async () => {
|
||||||
await sendChatGroup({groupId: selectedGroup,messageText: encryptSingle})
|
return await sendChatGroup({groupId: selectedGroup,messageText: encryptSingle})
|
||||||
};
|
};
|
||||||
|
|
||||||
// Add the function to the queue
|
// Add the function to the queue
|
||||||
@ -641,7 +641,7 @@ const clearEditorContent = () => {
|
|||||||
// const res = await sendChatGroup({groupId: selectedGroup,messageText: encryptSingle})
|
// const res = await sendChatGroup({groupId: selectedGroup,messageText: encryptSingle})
|
||||||
|
|
||||||
const sendMessageFunc = async () => {
|
const sendMessageFunc = async () => {
|
||||||
await sendChatGroup({groupId: selectedGroup,messageText: encryptSingle, chatReference: chatMessage.signature})
|
return await sendChatGroup({groupId: selectedGroup,messageText: encryptSingle, chatReference: chatMessage.signature})
|
||||||
};
|
};
|
||||||
|
|
||||||
// Add the function to the queue
|
// Add the function to the queue
|
||||||
|
@ -24,7 +24,7 @@ window.addEventListener("message", (event) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export const sendMessageBackground = (action, data = {}, timeout = 60000, isExtension, appInfo) => {
|
export const sendMessageBackground = (action, data = {}, timeout = 120000, isExtension, appInfo) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const requestId = generateRequestId(); // Unique ID for each request
|
const requestId = generateRequestId(); // Unique ID for each request
|
||||||
callbackMap.set(requestId, { resolve, reject }); // Store both resolve and reject callbacks
|
callbackMap.set(requestId, { resolve, reject }); // Store both resolve and reject callbacks
|
||||||
|
Loading…
x
Reference in New Issue
Block a user