6 lines
203 B
JavaScript
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
|
|
);
|
|
};
|