From 4e224c299697e570e98c388bf23a42ffa1e6af0d Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Fri, 31 Mar 2017 09:55:37 -0400 Subject: Implement PUT /channels/{channel_id}/members/{user_id}/notify_props for APIv4 (#5901) --- model/client4.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'model/client4.go') diff --git a/model/client4.go b/model/client4.go index 91b538ff8..a43950a68 100644 --- a/model/client4.go +++ b/model/client4.go @@ -1186,6 +1186,16 @@ func (c *Client4) UpdateChannelRoles(channelId, userId, roles string) (bool, *Re } } +// UpdateChannelNotifyProps will update the notification properties on a channel for a user. +func (c *Client4) UpdateChannelNotifyProps(channelId, userId string, props map[string]string) (bool, *Response) { + if r, err := c.DoApiPut(c.GetChannelMemberRoute(channelId, userId)+"/notify_props", MapToJson(props)); err != nil { + return false, &Response{StatusCode: r.StatusCode, Error: err} + } else { + defer closeBody(r) + return CheckStatusOK(r), BuildResponse(r) + } +} + // AddChannelMember adds user to channel and return a channel member. func (c *Client4) AddChannelMember(channelId, userId string) (*ChannelMember, *Response) { requestBody := map[string]string{"user_id": userId} -- cgit v1.2.3-1-g7c22