sameMessage

This commit is contained in:
InsanusMokrassar committed 2022-07-11 00:53:20 +06:00
1 parent 247553d990
commit 26306f1567
2 files changed
+12

No files matched your search

@@ -0,0 +1,10 @@
package dev.inmo.tgbotapi.extensions.utils.extensions
import dev.inmo.tgbotapi.types.message.abstracts.Message
/**
* @return true in case if [this] message is the same as [other]. The same here means that these messages from one chat
* and have equal [Message.messageId] identifier
*/
@Suppress("NOTHING_TO_INLINE")
inline fun Message.sameMessage(other: Message) = chat.id == other.chat.id && messageId == other.messageId