mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-15 08:29:25 +01:00
Add UpdateUserNick
This commit is contained in:
parent
d6ee55e35f
commit
86cd7f1ba6
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user