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; break;
} }
case TdApi.UpdateNotificationSettings.CONSTRUCTOR: { case TdApi.UpdateChatNotificationSettings.CONSTRUCTOR: {
TdApi.UpdateNotificationSettings update = (TdApi.UpdateNotificationSettings) object; TdApi.UpdateChatNotificationSettings update = (TdApi.UpdateChatNotificationSettings) object;
if (update.scope instanceof TdApi.NotificationSettingsScopeChat) { TdApi.Chat chat = chats.get(update.chatId);
TdApi.Chat chat = chats.get(((TdApi.NotificationSettingsScopeChat) update.scope).chatId); synchronized (chat) {
synchronized (chat) { chat.notificationSettings = update.notificationSettings;
chat.notificationSettings = update.notificationSettings;
}
} }
break; break;
} }