From 423bd5d628052a88274fd136fdb030e2273282c4 Mon Sep 17 00:00:00 2001 From: Alex Sytnyk Date: Thu, 16 Aug 2018 15:53:57 +0300 Subject: [PATCH] Fix TdApi.Message.isAppropriate() --- .../src/net/osmand/telegram/helpers/TelegramHelper.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt b/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt index bd09c9ca71..88ee57c93f 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt @@ -762,7 +762,8 @@ class TelegramHelper private constructor() { val content = content return when (content) { is TdApi.MessageLocation -> true - is TdApi.MessageText -> isOsmAndBot(senderUserId) || isOsmAndBot(viaBotUserId) + is TdApi.MessageText -> (isOsmAndBot(senderUserId) || isOsmAndBot(viaBotUserId)) + && content.text.text.startsWith(DEVICE_PREFIX) else -> false } }