summaryrefslogtreecommitdiffstats
path: root/model/client4.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-06-20 09:55:43 -0400
committerGeorge Goldberg <george@gberg.me>2017-06-20 14:55:43 +0100
commit2e6fd031d15a9502e7a7a4536febfe49780c0697 (patch)
tree644ad924de6ac441eee9f941683a6f92859229b6 /model/client4.go
parenteffaeee830efa78cd15218f6ba3920031ff8a5c1 (diff)
downloadchat-2e6fd031d15a9502e7a7a4536febfe49780c0697.tar.gz
chat-2e6fd031d15a9502e7a7a4536febfe49780c0697.tar.bz2
chat-2e6fd031d15a9502e7a7a4536febfe49780c0697.zip
Add GET /teams/invite/{invite_id} endpoint for v4 (#6685)
Diffstat (limited to 'model/client4.go')
-rw-r--r--model/client4.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/model/client4.go b/model/client4.go
index efe12a3b9..be8a689f2 100644
--- a/model/client4.go
+++ b/model/client4.go
@@ -1204,6 +1204,16 @@ func (c *Client4) InviteUsersToTeam(teamId string, userEmails []string) (bool, *
}
}
+// GetTeamInviteInfo returns a team object from an invite id containing sanitized information.
+func (c *Client4) GetTeamInviteInfo(inviteId string) (*Team, *Response) {
+ if r, err := c.DoApiGet(c.GetTeamsRoute()+"/invite/"+inviteId, ""); err != nil {
+ return nil, &Response{StatusCode: r.StatusCode, Error: err}
+ } else {
+ defer closeBody(r)
+ return TeamFromJson(r.Body), BuildResponse(r)
+ }
+}
+
// Channel Section
// CreateChannel creates a channel based on the provided channel struct.