public static string GetChatParticipants(RestCommand command) { ChatParticipants chatParticipants = new ChatParticipants(command.LoginUser); chatParticipants.LoadByOrganizationID(command.Organization.OrganizationID); if (command.Format == RestFormat.XML) { return(chatParticipants.GetXml("ChatParticipants", "ChatParticipant", true, command.Filters)); } else { throw new RestException(HttpStatusCode.BadRequest, "Invalid data format"); } }