Chatwoot/app/javascript/dashboard/store/modules/conversations/helpers.js
2020-12-25 13:15:01 +05:30

6 lines
203 B
JavaScript

export const findPendingMessageIndex = (chat, message) => {
const { echo_id: tempMessageId } = message;
return chat.messages.findIndex(
m => m.id === message.id || m.id === tempMessageId
);
};