From 86cd7f1ba617b79a374387e52df47b81b876cf09 Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 10 Sep 2017 16:33:29 +0200 Subject: Add UpdateUserNick --- matterclient/matterclient.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'matterclient') 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 { -- cgit v1.2.3