mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-14 09:33:09 -06:00
Exclude KindOld from sync
This commit is contained in:
parent
62afb936a5
commit
7f8d9986fe
|
|
@ -278,20 +278,14 @@ func (s *OutputRoomEventConsumer) onOldRoomEvent(
|
||||||
) error {
|
) error {
|
||||||
ev := msg.Event
|
ev := msg.Event
|
||||||
|
|
||||||
// TODO: The state key check when excluding from sync is designed
|
|
||||||
// to stop us from lying to clients with old state, whilst still
|
|
||||||
// allowing normal timeline events through. This is an absolute
|
|
||||||
// hack but until we have some better strategy for dealing with
|
|
||||||
// old events in the sync API, this should at least prevent us
|
|
||||||
// from confusing clients into thinking they've joined/left rooms.
|
|
||||||
pduPos, err := s.db.WriteEvent(
|
pduPos, err := s.db.WriteEvent(
|
||||||
ctx,
|
ctx,
|
||||||
ev,
|
ev,
|
||||||
[]*gomatrixserverlib.HeaderedEvent{},
|
[]*gomatrixserverlib.HeaderedEvent{},
|
||||||
[]string{}, // adds no state
|
[]string{}, // adds no state
|
||||||
[]string{}, // removes no state
|
[]string{}, // removes no state
|
||||||
nil, // no transaction
|
nil, // no transaction
|
||||||
ev.StateKey() != nil, // exclude from sync?,
|
true, // exclude from sync
|
||||||
msg.HistoryVisibility,
|
msg.HistoryVisibility,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue