internal static Chat FromJson(VkResponse response) { var chat = new Chat(); chat.Id = response["id"]; chat.Type = response["type"]; chat.Title = response["title"]; chat.AdminId = Utilities.GetNullableLongId(response["admin_id"]); chat.Users = response["users"]; #region Поля найденые експерементально chat.Left = response.ContainsKey("left") ? response["left"] : false; if (response.ContainsKey("push_settings")) { chat.Sound = response["push_settings"]["sound"]; chat.DisabledUntil = response["push_settings"]["disabled_until"]; } else { chat.Sound = null; chat.DisabledUntil = null; } #endregion return chat; }
internal static Chat FromJson(VkResponse response) { var chat = new Chat(); chat.Id = response["id"]; chat.Type = response["type"]; chat.Title = response["title"]; chat.AdminId = Utilities.GetNullableLongId(response["admin_id"]); chat.Users = response["users"]; return chat; }