remove unnecessary check for OsmAnd bot
This commit is contained in:
parent
c65868f522
commit
a12f2eca5a
1 changed files with 2 additions and 3 deletions
|
@ -256,8 +256,7 @@ class TelegramHelper private constructor() {
|
|||
}
|
||||
|
||||
fun getOsmAndBotDeviceName(message: TdApi.Message): String {
|
||||
val replyMarkup =
|
||||
message.replyMarkup as TdApi.ReplyMarkupInlineKeyboard
|
||||
val replyMarkup = message.replyMarkup as TdApi.ReplyMarkupInlineKeyboard
|
||||
val deviceName = replyMarkup.rows[0][1].text
|
||||
return deviceName.split("\\s".toRegex())[1]
|
||||
}
|
||||
|
@ -393,7 +392,7 @@ class TelegramHelper private constructor() {
|
|||
val oldContent = message.content
|
||||
if (oldContent is TdApi.MessageText) {
|
||||
message.content = parseOsmAndBotLocation(oldContent.text.text)
|
||||
} else if (oldContent is TdApi.MessageLocation && isOsmAndBot(message.senderUserId)) {
|
||||
} else if (oldContent is TdApi.MessageLocation) {
|
||||
message.content = parseOsmAndBotLocation(message)
|
||||
}
|
||||
removeOldMessages(message.senderUserId, message.chatId)
|
||||
|
|
Loading…
Reference in a new issue