Update Java example.

GitOrigin-RevId: 7a0f609d61433e19f8d052d34c9afe7a05e30716
This commit is contained in:
levlam 2018-05-15 16:26:57 +03:00
parent 515bf8c00c
commit 9d537842b7

View File

@ -485,13 +485,11 @@ public final class Example {
}
break;
}
case TdApi.UpdateNotificationSettings.CONSTRUCTOR: {
TdApi.UpdateNotificationSettings update = (TdApi.UpdateNotificationSettings) object;
if (update.scope instanceof TdApi.NotificationSettingsScopeChat) {
TdApi.Chat chat = chats.get(((TdApi.NotificationSettingsScopeChat) update.scope).chatId);
synchronized (chat) {
chat.notificationSettings = update.notificationSettings;
}
case TdApi.UpdateChatNotificationSettings.CONSTRUCTOR: {
TdApi.UpdateChatNotificationSettings update = (TdApi.UpdateChatNotificationSettings) object;
TdApi.Chat chat = chats.get(update.chatId);
synchronized (chat) {
chat.notificationSettings = update.notificationSettings;
}
break;
}