From 831ff6d0a9bb77a283cc823a953de430ad6b0f8d Mon Sep 17 00:00:00 2001 From: Wim Date: Thu, 21 Oct 2021 15:57:21 +0200 Subject: Update matterclient dep. Fixes #1617 --- go.mod | 2 +- go.sum | 2 ++ vendor/github.com/matterbridge/matterclient/messages.go | 5 ++--- vendor/modules.txt | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 648925ef..c96a08df 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( github.com/matterbridge/go-xmpp v0.0.0-20210731150933-5702291c239f github.com/matterbridge/gozulipbot v0.0.0-20200820220548-be5824faa913 github.com/matterbridge/logrus-prefixed-formatter v0.5.3-0.20200523233437-d971309a77ba - github.com/matterbridge/matterclient v0.0.0-20211016195328-346acac403d8 + github.com/matterbridge/matterclient v0.0.0-20211021135437-2dc2bc7dce2d github.com/mattermost/mattermost-server/v5 v5.39.0 github.com/mattermost/mattermost-server/v6 v6.0.0 github.com/mattn/godown v0.0.1 diff --git a/go.sum b/go.sum index ed55ddc0..9e06a55f 100644 --- a/go.sum +++ b/go.sum @@ -667,6 +667,8 @@ github.com/matterbridge/logrus-prefixed-formatter v0.5.3-0.20200523233437-d97130 github.com/matterbridge/logrus-prefixed-formatter v0.5.3-0.20200523233437-d971309a77ba/go.mod h1:iXGEotOvwI1R1SjLxRc+BF5rUORTMtE0iMZBT2lxqAU= github.com/matterbridge/matterclient v0.0.0-20211016195328-346acac403d8 h1:6U64ukl/GOvjPTKvUE9jmMLlvJCa+M2aoiq7myoE8RE= github.com/matterbridge/matterclient v0.0.0-20211016195328-346acac403d8/go.mod h1:Gh3tFUjkcPIBBeEkfXBbGio4ONMMKNmlmGECvXLY0TE= +github.com/matterbridge/matterclient v0.0.0-20211021135437-2dc2bc7dce2d h1:zOIeYDh2WcqEZkJTiV5tHynjuP40IFHubliqhvfhc/0= +github.com/matterbridge/matterclient v0.0.0-20211021135437-2dc2bc7dce2d/go.mod h1:Gh3tFUjkcPIBBeEkfXBbGio4ONMMKNmlmGECvXLY0TE= github.com/mattermost/go-i18n v1.11.0 h1:1hLKqn/ZvhZ80OekjVPGYcCrBfMz+YxNNgqS+beL7zE= github.com/mattermost/go-i18n v1.11.0/go.mod h1:RyS7FDNQlzF1PsjbJWHRI35exqaKGSO9qD4iv8QjE34= github.com/mattermost/gorp v1.6.2-0.20210419141818-0904a6a388d3/go.mod h1:QCQ3U0M9T/BlAdjKFJo0I1oe/YAgbyjNdhU8bpOLafk= diff --git a/vendor/github.com/matterbridge/matterclient/messages.go b/vendor/github.com/matterbridge/matterclient/messages.go index dc5d5380..3b8a3acc 100644 --- a/vendor/github.com/matterbridge/matterclient/messages.go +++ b/vendor/github.com/matterbridge/matterclient/messages.go @@ -264,9 +264,8 @@ func (m *Client) parseMessage(rmsg *Message) { case model.WebsocketEventPosted, model.WebsocketEventPostEdited, model.WebsocketEventPostDeleted: m.parseActionPost(rmsg) case "user_updated": - user := rmsg.Raw.GetData()["user"].(map[string]interface{}) - if _, ok := user["id"].(string); ok { - m.UpdateUser(user["id"].(string)) + if user, ok := rmsg.Raw.GetData()["user"].(*model.User); ok { + m.UpdateUser(user.Id) } case "group_added": if err := m.UpdateChannels(); err != nil { diff --git a/vendor/modules.txt b/vendor/modules.txt index 7ef305a3..1c1707a0 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -189,7 +189,7 @@ github.com/matterbridge/gozulipbot # github.com/matterbridge/logrus-prefixed-formatter v0.5.3-0.20200523233437-d971309a77ba ## explicit github.com/matterbridge/logrus-prefixed-formatter -# github.com/matterbridge/matterclient v0.0.0-20211016195328-346acac403d8 +# github.com/matterbridge/matterclient v0.0.0-20211021135437-2dc2bc7dce2d ## explicit; go 1.16 github.com/matterbridge/matterclient # github.com/mattermost/go-i18n v1.11.0 -- cgit v1.2.3