diff options
Diffstat (limited to 'model/client4.go')
-rw-r--r-- | model/client4.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/model/client4.go b/model/client4.go index 943525420..6281b3df4 100644 --- a/model/client4.go +++ b/model/client4.go @@ -2286,6 +2286,19 @@ func (c *Client4) UpdateUserStatus(userId string, userStatus *Status) (*Status, } } +// Webrtc Section + +// GetWebrtcToken returns a valid token, stun server and turn server with credentials to +// use with the Mattermost WebRTC service. +func (c *Client4) GetWebrtcToken() (*WebrtcInfoResponse, *Response) { + if r, err := c.DoApiGet("/webrtc/token", ""); err != nil { + return nil, &Response{StatusCode: r.StatusCode, Error: err} + } else { + defer closeBody(r) + return WebrtcInfoResponseFromJson(r.Body), BuildResponse(r) + } +} + // Emoji Section // CreateEmoji will save an emoji to the server if the current user has permission |