5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-26 04:21:38 +00:00

Add UpdateUserNick

This commit is contained in:
Wim 2017-09-10 16:33:29 +02:00
parent d6ee55e35f
commit 86cd7f1ba6

View File

@ -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 { func (m *MMClient) UsernamesInChannel(channelId string) []string {
res, resp := m.Client.GetChannelMembers(channelId, 0, 50000, "") res, resp := m.Client.GetChannelMembers(channelId, 0, 50000, "")
if resp.Error != nil { if resp.Error != nil {