diff --git a/cmd/signaldctl/cmd/group/show/show-group.go b/cmd/signaldctl/cmd/group/show/show-group.go index 2e1b274..61584ad 100644 --- a/cmd/signaldctl/cmd/group/show/show-group.go +++ b/cmd/signaldctl/cmd/group/show/show-group.go @@ -83,18 +83,30 @@ var ( } fmt.Println("Members") - membere164s := make(map[string]string) - for _, member := range group.Members { - if member.Number == "" { - continue - } - membere164s[member.UUID] = member.Number - } + // membere164s := make(map[string]string) + // for _, member := range group.Members { + // if member.Number == "" { + // continue + // } + // membere164s[member.UUID] = member.Number + // } t := table.NewWriter() - t.AppendHeader(table.Row{"Number", "UUID", "Role"}) + t.AppendHeader(table.Row{"Number", "UUID", "Name", "Role"}) for _, member := range group.MemberDetail { - t.AppendRow(table.Row{membere164s[member.UUID], member.UUID, member.Role}) + req := v1.GetProfileRequest{ + Account: account, + Address: &v1.JsonAddress{UUID: member.UUID}, + Async: true, + } + e164 := "" + profile, err := req.Submit(common.Signald) + if err != nil { + log.Println("error getting profile: ", err) + } else { + e164 = profile.Address.Number + } + t.AppendRow(table.Row{e164, member.UUID, profile.ProfileName, member.Role}) } t.SetOutputMirror(os.Stdout) common.StylizeTable(t)