Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added fields to OnlineClient #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

razaqq
Copy link

@razaqq razaqq commented Aug 28, 2020

No description provided.

}

// ClientList returns a list of online clients.
func (s *ServerMethods) ClientList() ([]*OnlineClient, error) {
var clients []*OnlineClient
if _, err := s.ExecCmd(NewCmd("clientlist").WithResponse(&clients)); err != nil {
if _, err := s.ExecCmd(NewCmd("clientlist -away -voice -country").WithResponse(&clients)); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these the only options or should they be configurable?

Also as they are optional is there a performance reason not to specify them all the time?

@@ -358,12 +358,15 @@ type OnlineClient struct {
Type int `ms:"client_type"`
Away bool `ms:"client_away"`
AwayMessage string `ms:"client_away_message"`
Country string `ms:"client_country"`
InputMuted bool `ms:"client_input_muted"`
OutputMuted bool `ms:"client_output_muted"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also add validation of the data to the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants