public static Chat FromJson(VkResponse response)
{
var chat = new Chat
{
Id = response["id"],
Type = response["type"],
Title = response["title"],
AdminId = Utilities.GetNullableLongId(response["admin_id"]),
Users = response["users"],
#region Поля найденые експерементально
Left = response.ContainsKey("left") && response["left"]
};
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;
}