Mensagens Editadas #308
henriquepontalti
started this conversation in
General
Replies: 1 comment
-
Updated messages came in the messages.upser events. They have this node inside their payload: message.editedMessage. const getWhetherOrNotMessageIsAnUpdate = (message: WAMessage): boolean => {
if (message.message?.editedMessage) {
return true;
}
return false;
}; I use this piece of code to evaluate whether an upcoming message is an update or not. If it is, I get the message that has been updated like this: const getMessageThatsBeenUpdated = (message: WAMessage): boolean | string | null | undefined => {
if (message.message?.editedMessage) {
return message.message?.editedMessage?.message as string;
}
return false;
}; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Como atualizar mensagens que são editadas?
Beta Was this translation helpful? Give feedback.
All reactions