Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixed send status error #1540

Merged
merged 5 commits into from
Dec 15, 2023

Conversation

icleitoncosta
Copy link
Contributor

erro ao postar status

Apresentava o seguinte erro ao tentar postar status, fazendo o wrapper dessa função resolveu o mesmo.

/**
* @whatsapp 355813
*/
export declare function GROUP_JID(jid: Wid): Promise<any>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@icleitoncosta , poderia verificar se essa função é realmente assíncrona, pelo que lembro é uma função normal, talvez tenha que tirar os await/async nos usos.

@edgardmessias
Copy link
Contributor

@icleitoncosta , só falta ajustar o tipo de função que não é assíncrona para fazer merge desse PR

Copy link
Contributor

@edgardmessias edgardmessias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Só falta remover os async/await nos pontos que marquei.

@@ -132,4 +134,11 @@ webpack.onInjected(() => {

return await func(...args);
});

wrapModuleFunction(GROUP_JID, async (func, ...args) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
wrapModuleFunction(GROUP_JID, async (func, ...args) => {
wrapModuleFunction(GROUP_JID, (func, ...args) => {


wrapModuleFunction(GROUP_JID, async (func, ...args) => {
if (args[0].toString().includes('broadcast')) {
return await CHAT_JID(...args);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return await CHAT_JID(...args);
return CHAT_JID(...args);

if (args[0].toString().includes('broadcast')) {
return await CHAT_JID(...args);
}
return await func(...args);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return await func(...args);
return func(...args);

@icleitoncosta icleitoncosta merged commit fe69680 into wppconnect-team:main Dec 15, 2023
26 checks passed
@icleitoncosta icleitoncosta deleted the text-status branch December 15, 2023 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants