Skip to content

Unable to edit messages in @lid chats #5671

@kleberMRocha

Description

@kleberMRocha

Is there an existing issue for this?

  • I have searched the existing issues.

Is this a problem caused by your code, or is it specifically because of the library?

  • I have double-checked my code carefully.

Describe the bug.

When sending a message and saving the returned _serialized ID, editing works as expected for chats with @c.us.

However, when the message belongs to a chat with '@lid', calling message.edit(newContent) does not throw an error but returns null, even when all WhatsApp editing requirements are met.

Expected Behavior

The message should be edited successfully.

It would be helpful if the library could indicate when editing is not supported for '@lid' messages, instead of returning null.

Steps to Reproduce the Bug or Issue

Send a message using:

const wpMsg = await client.sendMessage(target, content, options);

Save wpMsg.id._serialized in the database

Retrieve the message later using:

const message = await client.getMessageById(id_WP);

Call:

await message.edit(newContent);

Observe that when message.id.remote ends with '@lid', the method returns null

WhatsApp Account Type

Standard

Browser Type

chromium

Operation System Type

Linux

Phone OS Type

Android

WhatsApp-Web.js Version

1.34.3

WhatsApp Web Version

2.3000.1031079374

Node.js Version

v22.20.0

Authentication Strategy

LocalAuth

Additional Context

Verified WhatsApp edit requirements

I have confirmed that all official WhatsApp requirements for editing a message are satisfied:

The message is edited within 15 minutes of being sent

WhatsApp is up to date

The message is a text message (not media)

The message was not forwarded

The message was sent by me (fromMe === true)

Despite this, the edit still returns null for '@lid' chats.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions