Add UpdateStatus function

This commit is contained in:
Wim 2018-04-01 22:53:12 +02:00
parent 76360f89c1
commit 8bfaa007d5

View File

@ -772,6 +772,14 @@ func (m *MMClient) GetStatus(userId string) string {
return "offline"
}
func (m *MMClient) UpdateStatus(userId string, status string) error {
_, resp := m.Client.UpdateUserStatus(userId, &model.Status{Status: status})
if resp.Error != nil {
return resp.Error
}
return nil
}
func (m *MMClient) GetStatuses() map[string]string {
var ids []string
statuses := make(map[string]string)