Fix TelegramHelper#removeOldMessages
This commit is contained in:
parent
2154d57894
commit
990842d775
1 changed files with 8 additions and 6 deletions
|
@ -507,12 +507,14 @@ class TelegramHelper private constructor() {
|
|||
if (newMessage.chatId == message.chatId) {
|
||||
val sameSender = newMessage.senderUserId == message.senderUserId
|
||||
val viaSameBot = newMessage.viaBotUserId == message.viaBotUserId
|
||||
if ((fromBot && sameSender) || (viaBot && viaSameBot)) {
|
||||
val newCont = newMessage.content
|
||||
val cont = message.content
|
||||
if (newCont is MessageOsmAndBotLocation && cont is MessageOsmAndBotLocation) {
|
||||
if (newCont.name == cont.name) {
|
||||
iterator.remove()
|
||||
if (fromBot || viaBot) {
|
||||
if ((fromBot && sameSender) || (viaBot && viaSameBot)) {
|
||||
val newCont = newMessage.content
|
||||
val cont = message.content
|
||||
if (newCont is MessageOsmAndBotLocation && cont is MessageOsmAndBotLocation) {
|
||||
if (newCont.name == cont.name) {
|
||||
iterator.remove()
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (sameSender) {
|
||||
|
|
Loading…
Reference in a new issue