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

Edit Message Fails Silently #webpack-exodus #3017

Closed
1 task done
martinezhermes opened this issue May 8, 2024 · 3 comments
Closed
1 task done

Edit Message Fails Silently #webpack-exodus #3017

martinezhermes opened this issue May 8, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@martinezhermes
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I'm currently using #webpack-exodus branch, trying some code where I can react, reply, quote, etc, however edit does not work.
Is it supposed to be functional?
Trying to debug I got as far as:

let canEditText = window.Store.MsgActionChecks.canEditText(msg);
let canEditCaption = window.Store.MsgActionChecks.canEditCaption(msg);

These two variables resolve to false while trying to edit a message sent a few seconds before the edit instruction is triggered.

Expected behavior

Edit a user message is supposed to work, right?

Steps to Reproduce the Bug or Issue

  • Install #webpack-exodus
  • Try to edit a message
  • Fails without error

Relevant Code

if (msg.hasQuotedMsg) {
    const quotedMsg = await msg.getQuotedMessage();
    quotedMsg.edit(`Test`).then((res)=>{
        console.log(res)
    }).catch(errro => {
        console.error('Erro ao deletar')
    })
    msg.react('✏️')
}

Browser Type

Google Chrome

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

Linux / Ubuntu / Docker

Additional context

No response

@martinezhermes martinezhermes added the bug Something isn't working label May 8, 2024
@themazim
Copy link

Not sure if you are actually trying to edit your own message or a quoted message from someone else, which you can not edit.

Since canEdit* returns false, it seems the message just cannot be edited by you. The underlying methods are taken directly from WhatsApp web and, unless the wrong message is passed, should work as intended.

@martinezhermes
Copy link
Author

Not sure if you are actually trying to edit your own message or a quoted message from someone else, which you can not edit.

Since canEdit* returns false, it seems the message just cannot be edited by you. The underlying methods are taken directly from WhatsApp web and, unless the wrong message is passed, should work as intended.

that's the code i've got from the documentation, I am of course trying to edit my own messages as well as quoted own messages, does edit work for you in any way @themazim ?

@tofers
Copy link
Contributor

tofers commented May 18, 2024

I checked the editing on the new version. Everything works as before.
As before, the message can only be edited when send from the web.

That is, you write through the lib and these messages can be edited. Messages written from the phone can be edited only on the phone. It has always worked like this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants