summaryrefslogtreecommitdiffstats
path: root/matterclient
diff options
context:
space:
mode:
Diffstat (limited to 'matterclient')
-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 {