Closed loic-hamdi closed 1 year ago
@loic-hamdi i havent worked on the group part yet, can you first check if deleting a normalchat message works ?
Changing the code to this works in normal chat and group chat ✅
/// Delete message
Future deleteMessage({
required String phone,
required String messageId,
bool deleteMediaInDevice = false,
bool revoke = false,
}) async {
return await wpClient.evaluateJs(
'''WPP.chat.deleteMessage(${phone.phoneParse},${messageId.jsParse}, $deleteMediaInDevice, $revoke);''',
methodName: "deleteMessage",
);
}
Note: Set revoke: true
if you want to delete for everyone in group chat
Hi @rohitsangwan01 , for some reasons I can't delete messages anymore. Is it still working on your side?
Where do you get the data from for: phone
and messageId
?
Future<dynamic> deleteMessage({
required String phone,
required String messageId,
bool deleteMediaInDevice = false,
bool revoke = false,
})
Hey,
I am trying to delete a message but I can't for some reasons. It breaks my session and give the error message
Evaluation failed: SyntaxError: Invalid or unexpected token
What is please the good way to do it?