summaryrefslogtreecommitdiffstats
path: root/matterclient/matterclient.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-09-10 16:33:29 +0200
committerWim <wim@42.be>2017-09-10 16:33:29 +0200
commit86cd7f1ba617b79a374387e52df47b81b876cf09 (patch)
treed7212cfa16ceb5e464203ed6afee138562172b99 /matterclient/matterclient.go
parentd6ee55e35f745c441dac115fc165dbdcae9496bb (diff)
downloadmatterbridge-msglm-86cd7f1ba617b79a374387e52df47b81b876cf09.tar.gz
matterbridge-msglm-86cd7f1ba617b79a374387e52df47b81b876cf09.tar.bz2
matterbridge-msglm-86cd7f1ba617b79a374387e52df47b81b876cf09.zip
Add UpdateUserNick
Diffstat (limited to 'matterclient/matterclient.go')
-rw-r--r--matterclient/matterclient.go10
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 {