mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 08:13:09 -06:00
Tweaks
This commit is contained in:
parent
fb11f70162
commit
8fa5039136
|
|
@ -84,7 +84,7 @@ const selectCurrentStateSQL = "" +
|
||||||
" AND ( $4::text[] IS NULL OR type LIKE ANY($4) )" +
|
" AND ( $4::text[] IS NULL OR type LIKE ANY($4) )" +
|
||||||
" AND ( $5::text[] IS NULL OR NOT(type LIKE ANY($5)) )" +
|
" AND ( $5::text[] IS NULL OR NOT(type LIKE ANY($5)) )" +
|
||||||
" AND ( $6::bool IS NULL OR contains_url = $6 )" +
|
" AND ( $6::bool IS NULL OR contains_url = $6 )" +
|
||||||
" AND NOT (event_id = ANY($7))" +
|
" AND event_id != ANY($7)" +
|
||||||
" LIMIT $8"
|
" LIMIT $8"
|
||||||
|
|
||||||
const selectJoinedUsersSQL = "" +
|
const selectJoinedUsersSQL = "" +
|
||||||
|
|
|
||||||
|
|
@ -225,8 +225,10 @@ func (p *PDUStreamProvider) getJoinResponseForCompleteSync(
|
||||||
|
|
||||||
// Get the event IDs of the stream events we fetched. There's no point in us
|
// Get the event IDs of the stream events we fetched. There's no point in us
|
||||||
excludingEventIDs := make([]string, 0, len(recentStreamEvents))
|
excludingEventIDs := make([]string, 0, len(recentStreamEvents))
|
||||||
for _, eventID := range recentStreamEvents {
|
for _, event := range recentStreamEvents {
|
||||||
excludingEventIDs = append(excludingEventIDs, eventID.EventID())
|
if event.StateKey() != nil {
|
||||||
|
excludingEventIDs = append(excludingEventIDs, event.EventID())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stateEvents, err := p.DB.CurrentState(ctx, roomID, stateFilter, excludingEventIDs)
|
stateEvents, err := p.DB.CurrentState(ctx, roomID, stateFilter, excludingEventIDs)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue