Fix compatibility issue with TdLib

This commit is contained in:
Alex Sytnyk 2018-09-11 13:57:38 +03:00
parent 4980736146
commit 6ac2989f2c

View file

@ -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
}
}
}