question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is the delete/editMessage working?

See original GitHub issue

I have tried with several examples but none of them work to delete/edit messages. I have tried to delete a message like this:

  const result = await client.invoke(
    new Api.messages.DeleteMessages({
      id: [22],
      revoke: true,
    }),
  );
  console.log(result, 'result');

no success. Console is printed with this:

{
  CONSTRUCTOR_ID: 2228326789,
  SUBCLASS_OF_ID: 3469983854,
  className: 'messages.AffectedMessages',
  classType: 'constructor',
  pts: 661,
  ptsCount: 0
} result

I also tried with this:

      await client.deleteMessages(secondChatId, [17, 18, 20], {
        revoke: true,
      });

and not working as well. And edit message:

  await client.editMessage(secondChatId, {
    message: 22,
    text: 'Test edit',
  });

Nothing is printed.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ncesarcommented, Dec 20, 2022

Sorry @painor everything is working as expected.

The problem that I was facing is that I was trying to delete the message using the messageID from another channel. Sorry.

0reactions
ncesarcommented, Dec 19, 2022

I’m pretty sure I was deleting the correct ID. Are you able to reproduce it? I was using a user in a channel group.

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS 16: Here's how easy it is to edit or delete messages in the ...
Once you've installed iOS 16, here's how you can edit and delete sent iMessages. To be clear -- you can use the edit...
Read more >
What really happens when you unsend a text on your iPhone
One of the most noteworthy features of iOS 16 is the ability to edit and unsend text messages. It's not as clear-cut as...
Read more >
Unsend and edit messages on iPhone - Apple Support
Unsend a message​​ You can undo a recently sent message for up to two minutes after sending it. Touch and hold the message...
Read more >
How to Unsend and Edit Messages in iOS 16 | WIRED
To edit a message, long-press on the text and tap Edit. ... As with the Unsend message feature, it will only work if...
Read more >
iPhone users can now edit and unsend text messages - NPR
Typo-prone texters, rejoice: The newest Apple iOS now allows users to edit – and even unsend – messages sent via iMessage.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found