Fix TdApi.Message.isAppropriate()

This commit is contained in:
Alex Sytnyk 2018-08-03 13:30:38 +03:00
parent b1ea1e5db7
commit 5e191e268d

View file

@ -629,15 +629,7 @@ class TelegramHelper private constructor() {
val content = content
return when (content) {
is TdApi.MessageLocation -> true
is TdApi.MessageText -> {
if (content.text.text.startsWith("{")) {
// TODO: get user from library if null
if (isOsmAndBot(senderUserId)) {
return true
}
}
false
}
is TdApi.MessageText -> isOsmAndBot(senderUserId) || isOsmAndBot(viaBotUserId)
else -> false
}
}