mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-23 06:43:09 -06:00
Bugfix and remove another needless query
This commit is contained in:
parent
63c0819e65
commit
cd7ab95dfe
|
|
@ -208,13 +208,9 @@ func buildInviteStrippedState(
|
|||
StateKey: "",
|
||||
})
|
||||
}
|
||||
_, currentStateSnapshotNID, _, err := db.LatestEventIDs(ctx, info.RoomNID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
roomState := state.NewStateResolution(db)
|
||||
stateEntries, err := roomState.LoadStateAtSnapshotForStringTuples(
|
||||
ctx, currentStateSnapshotNID, stateWanted,
|
||||
ctx, info.StateSnapshotNID, stateWanted,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
|
|
@ -559,6 +559,9 @@ func (r *RoomserverInternalAPI) isServerCurrentlyInRoom(ctx context.Context, ser
|
|||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
if info == nil {
|
||||
return false, fmt.Errorf("unknown room %s", roomID)
|
||||
}
|
||||
|
||||
eventNIDs, err := r.DB.GetMembershipEventNIDsForRoom(ctx, info.RoomNID, true, false)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue