From 8bfaa007d5200e0b30b59a3fcccdbed8f39f571c Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 1 Apr 2018 22:53:12 +0200 Subject: Add UpdateStatus function --- matterclient/matterclient.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/matterclient/matterclient.go b/matterclient/matterclient.go index 79787917..afd445b5 100644 --- a/matterclient/matterclient.go +++ b/matterclient/matterclient.go @@ -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) -- cgit v1.2.3