mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Move /event to the SyncAPI (#2782)
This allows us to apply history visibility without having to recalculate it in the roomserver. Unblocks https://github.com/matrix-org/complement/pull/495, fix missing part of https://github.com/matrix-org/dendrite/issues/617
This commit is contained in:
parent
fb6cb2dbcb
commit
0f09e9d196
8 changed files with 124 additions and 153 deletions
|
@ -19,11 +19,13 @@ import (
|
|||
"math"
|
||||
"time"
|
||||
|
||||
"github.com/matrix-org/dendrite/roomserver/api"
|
||||
"github.com/matrix-org/dendrite/syncapi/storage"
|
||||
"github.com/matrix-org/gomatrixserverlib"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/tidwall/gjson"
|
||||
|
||||
"github.com/matrix-org/dendrite/roomserver/api"
|
||||
"github.com/matrix-org/dendrite/syncapi/storage"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -189,7 +191,7 @@ func visibilityForEvents(
|
|||
UserID: userID,
|
||||
}, membershipResp)
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue