summaryrefslogtreecommitdiffstats
path: root/matterclient/matterclient.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-04-01 22:53:12 +0200
committerWim <wim@42.be>2018-04-01 22:53:12 +0200
commit8bfaa007d5200e0b30b59a3fcccdbed8f39f571c (patch)
tree15dd301ebbb4747940df46a8e0d02eb2a62f7150 /matterclient/matterclient.go
parent76360f89c1b98b8f3926f12c25d11e3c1efd8925 (diff)
downloadmatterbridge-msglm-8bfaa007d5200e0b30b59a3fcccdbed8f39f571c.tar.gz
matterbridge-msglm-8bfaa007d5200e0b30b59a3fcccdbed8f39f571c.tar.bz2
matterbridge-msglm-8bfaa007d5200e0b30b59a3fcccdbed8f39f571c.zip
Add UpdateStatus function
Diffstat (limited to 'matterclient/matterclient.go')
-rw-r--r--matterclient/matterclient.go8
1 files changed, 8 insertions, 0 deletions
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)