isEquals method
- ChatMessage other
Indicates whether the other
message shares the same text, repliesTo,
author, chatId and attachments as this ChatMessage.
Implementation
bool isEquals(ChatMessage other) {
return text == other.text &&
repliesTo.every(
(e) => other.repliesTo.any(
(m) =>
m.runtimeType == e.runtimeType &&
m.at == e.at &&
m.author == e.author &&
m.original?.id == e.original?.id,
),
) &&
author.id == other.author.id &&
chatId == other.chatId &&
attachments.every(
(e) => other.attachments.any(
(m) =>
m.original.relativeRef == e.original.relativeRef &&
m.filename == e.filename,
),
);
}