mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 10:33:11 -06:00
Don't fail if we can't fetch the membership, default to 'leave' instead
This commit is contained in:
parent
6a47c2f11b
commit
ab7deefdc4
|
|
@ -19,11 +19,13 @@ import (
|
||||||
"math"
|
"math"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/matrix-org/dendrite/roomserver/api"
|
|
||||||
"github.com/matrix-org/dendrite/syncapi/storage"
|
|
||||||
"github.com/matrix-org/gomatrixserverlib"
|
"github.com/matrix-org/gomatrixserverlib"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
"github.com/tidwall/gjson"
|
"github.com/tidwall/gjson"
|
||||||
|
|
||||||
|
"github.com/matrix-org/dendrite/roomserver/api"
|
||||||
|
"github.com/matrix-org/dendrite/syncapi/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
@ -189,7 +191,7 @@ func visibilityForEvents(
|
||||||
UserID: userID,
|
UserID: userID,
|
||||||
}, membershipResp)
|
}, membershipResp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return result, err
|
logrus.WithError(err).Error("visibilityForEvents: failed to fetch membership at event, defaulting to 'leave'")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a map from eventID -> eventVisibility
|
// Create a map from eventID -> eventVisibility
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue