diff --git a/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt b/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt index 8da43ee783..ca6f7c717f 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt @@ -1203,14 +1203,12 @@ class TelegramHelper private constructor() { //listener?.onTelegramChatsChanged() } } - TdApi.UpdateNotificationSettings.CONSTRUCTOR -> { - val update = obj as TdApi.UpdateNotificationSettings - if (update.scope is TdApi.NotificationSettingsScopeChat) { - val chat = chats[(update.scope as TdApi.NotificationSettingsScopeChat).chatId] - if (chat != null) { - synchronized(chat) { - chat.notificationSettings = update.notificationSettings - } + TdApi.UpdateChatNotificationSettings.CONSTRUCTOR -> { + val update = obj as TdApi.UpdateChatNotificationSettings + val chat = chats[update.chatId] + if (chat != null) { + synchronized(chat) { + chat.notificationSettings = update.notificationSettings } } }