namespace slskd.API.DTO { using Soulseek; public class RoomInfoResponse { /// /// Gets the room name. /// public string Name { get; init; } /// /// Gets the number of users in the room. /// public int UserCount { get; init; } /// /// Gets a value indicating whether the room is private. /// public bool IsPrivate { get; init; } /// /// Gets a value indicating whether the room is owned by the currently logged in user. /// public bool IsOwned { get; init; } /// /// Gets a value indicating whether the room is moderated by the currently logged in user. /// public bool IsModerated { get; set; } public static RoomInfoResponse FromRoomInfo(RoomInfo info, bool isPrivate = false, bool isOwned = false) { return new RoomInfoResponse() { Name = info.Name, UserCount = info.UserCount, IsPrivate = isPrivate, IsOwned = isOwned }; } } }