diff --git a/Gopkg.lock b/Gopkg.lock index d782b12..a4552e2 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -123,7 +123,7 @@ ".", "format" ] - revision = "692bae934fcd3b7f4379e89d7271220f1d81f318" + revision = "ead1f970c8f56d1854cb9eb4a54c03aa6dafd753" [[projects]] branch = "master" @@ -141,7 +141,7 @@ branch = "master" name = "maunium.net/go/mautrix-appservice" packages = ["."] - revision = "62ccd06944c74b6e526b493ef66fc736d23b1cf2" + revision = "269f2ab602126a2de94bc86a457392426cce1ab2" [solve-meta] analyzer-name = "dep" diff --git a/vendor/maunium.net/go/gomatrix/client.go b/vendor/maunium.net/go/gomatrix/client.go index 186d83c..14549ba 100644 --- a/vendor/maunium.net/go/gomatrix/client.go +++ b/vendor/maunium.net/go/gomatrix/client.go @@ -677,6 +677,7 @@ func (cli *Client) Upload(content io.Reader, contentType string, contentLength i } req.Header.Set("Content-Type", contentType) req.ContentLength = contentLength + cli.LogRequest(req, fmt.Sprintf("%d bytes", contentLength)) res, err := cli.Client.Do(req) if res != nil { defer res.Body.Close() diff --git a/vendor/maunium.net/go/mautrix-appservice/statestore.go b/vendor/maunium.net/go/mautrix-appservice/statestore.go index 173a3f3..944e865 100644 --- a/vendor/maunium.net/go/mautrix-appservice/statestore.go +++ b/vendor/maunium.net/go/mautrix-appservice/statestore.go @@ -113,8 +113,12 @@ func (store *BasicStateStore) GetRoomMemberships(roomID string) map[string]strin func (store *BasicStateStore) GetMembership(roomID, userID string) string { store.membershipsLock.RLock() - membership, ok := store.GetRoomMemberships(roomID)[userID] - store.membershipsLock.RUnlock() + defer store.membershipsLock.RUnlock() + memberships, ok := store.Memberships[roomID] + if !ok { + return "leave" + } + membership, ok := memberships[userID] if !ok { return "leave" }