Store the history visibilty calculated by the roomserver

This commit is contained in:
Till Faelligen 2022-06-14 16:07:04 +02:00
parent f9c7013061
commit 8f9882c84d
2 changed files with 4 additions and 1 deletions

View file

@ -240,6 +240,7 @@ func (s *OutputRoomEventConsumer) onNewRoomEvent(
msg.RemovesStateEventIDs, msg.RemovesStateEventIDs,
msg.TransactionID, msg.TransactionID,
false, false,
msg.HistoryVisibility,
) )
if err != nil { if err != nil {
// panic rather than continue with an inconsistent database // panic rather than continue with an inconsistent database
@ -289,7 +290,8 @@ func (s *OutputRoomEventConsumer) onOldRoomEvent(
[]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? ev.StateKey() != nil, // exclude from sync?,
msg.HistoryVisibility,
) )
if err != nil { if err != nil {
// panic rather than continue with an inconsistent database // panic rather than continue with an inconsistent database

View file

@ -578,6 +578,7 @@ func (r *messagesReq) backfill(roomID string, backwardsExtremities map[string][]
[]string{}, []string{},
[]string{}, []string{},
nil, true, nil, true,
gomatrixserverlib.HistoryVisibilityShared,
) )
if err != nil { if err != nil {
return nil, err return nil, err