add check for Osmand bot

This commit is contained in:
Chumva 2018-08-03 14:42:01 +03:00
parent a12f2eca5a
commit 87879559bb

View file

@ -392,7 +392,8 @@ 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) {
} else if (oldContent is TdApi.MessageLocation &&
(isOsmAndBot(message.senderUserId) || isOsmAndBot(message.viaBotUserId))) {
message.content = parseOsmAndBotLocation(message)
}
removeOldMessages(message.senderUserId, message.chatId)