From 393f9e998b1b40aa59d3fb8794c3a73da38c3fb7 Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 24 May 2020 00:06:21 +0200 Subject: Update dependencies / vendor (#1146) --- vendor/github.com/keybase/go-keybase-chat-bot/kbchat/team.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'vendor/github.com/keybase/go-keybase-chat-bot/kbchat/team.go') diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/team.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/team.go index 71ec37d3..d3fa57ea 100644 --- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/team.go +++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/team.go @@ -26,7 +26,11 @@ type ListUserMemberships struct { } func (a *API) ListMembersOfTeam(teamName string) (res keybase1.TeamMembersDetails, err error) { - apiInput := fmt.Sprintf(`{"method": "list-team-memberships", "params": {"options": {"team": "%s"}}}`, teamName) + teamNameEscaped, err := json.Marshal(teamName) + if err != nil { + return res, err + } + apiInput := fmt.Sprintf(`{"method": "list-team-memberships", "params": {"options": {"team": %s}}}`, teamNameEscaped) cmd := a.runOpts.Command("team", "api") cmd.Stdin = strings.NewReader(apiInput) var stderr bytes.Buffer @@ -51,7 +55,11 @@ func (a *API) ListMembersOfTeam(teamName string) (res keybase1.TeamMembersDetail } func (a *API) ListUserMemberships(username string) ([]keybase1.AnnotatedMemberInfo, error) { - apiInput := fmt.Sprintf(`{"method": "list-user-memberships", "params": {"options": {"username": "%s"}}}`, username) + usernameEscaped, err := json.Marshal(username) + if err != nil { + return nil, err + } + apiInput := fmt.Sprintf(`{"method": "list-user-memberships", "params": {"options": {"username": %s}}}`, usernameEscaped) cmd := a.runOpts.Command("team", "api") cmd.Stdin = strings.NewReader(apiInput) var stderr bytes.Buffer -- cgit v1.2.3