More tweaks

This commit is contained in:
Till Faelligen 2022-10-11 15:26:25 +02:00
parent f76c9fb2cc
commit bd2b406404
No known key found for this signature in database
GPG key ID: 3DF82D8AB9211D4E
2 changed files with 4 additions and 2 deletions

View file

@ -59,7 +59,7 @@ func HistoryVisibilityForRoom(authEvents []*gomatrixserverlib.Event) gomatrixser
continue
}
if vis, err := ev.HistoryVisibility(); err == nil {
return vis
visibility = vis
}
}
return visibility

View file

@ -21,10 +21,11 @@ import (
"fmt"
"github.com/lib/pq"
"github.com/matrix-org/util"
"github.com/matrix-org/dendrite/internal/sqlutil"
"github.com/matrix-org/dendrite/roomserver/storage/tables"
"github.com/matrix-org/dendrite/roomserver/types"
"github.com/matrix-org/util"
)
const stateSnapshotSchema = `
@ -91,6 +92,7 @@ const bulkSelectStateForHistoryVisibilitySQL = `
WHERE state_snapshot_nid = $1
)
)
ORDER BY depth ASC
) AS roomserver_events
INNER JOIN roomserver_event_state_keys
ON roomserver_events.event_state_key_nid = roomserver_event_state_keys.event_state_key_nid