diff options
author | Wim <wim@42.be> | 2017-09-10 16:33:29 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2017-09-10 16:33:29 +0200 |
commit | 86cd7f1ba617b79a374387e52df47b81b876cf09 (patch) | |
tree | d7212cfa16ceb5e464203ed6afee138562172b99 | |
parent | d6ee55e35f745c441dac115fc165dbdcae9496bb (diff) | |
download | matterbridge-msglm-86cd7f1ba617b79a374387e52df47b81b876cf09.tar.gz matterbridge-msglm-86cd7f1ba617b79a374387e52df47b81b876cf09.tar.bz2 matterbridge-msglm-86cd7f1ba617b79a374387e52df47b81b876cf09.zip |
Add UpdateUserNick
-rw-r--r-- | matterclient/matterclient.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/matterclient/matterclient.go b/matterclient/matterclient.go index efd43038..e348b760 100644 --- a/matterclient/matterclient.go +++ b/matterclient/matterclient.go @@ -574,6 +574,16 @@ func (m *MMClient) UpdateLastViewed(channelId string) { } } +func (m *MMClient) UpdateUserNick(nick string) error { + user := m.User + user.Nickname = nick + _, resp := m.Client.UpdateUser(user) + if resp.Error != nil { + return resp.Error + } + return nil +} + func (m *MMClient) UsernamesInChannel(channelId string) []string { res, resp := m.Client.GetChannelMembers(channelId, 0, 50000, "") if resp.Error != nil { |