mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-23 14:53:10 -06:00
nil guard
This commit is contained in:
parent
cd7ab95dfe
commit
b32684caa8
|
|
@ -176,6 +176,9 @@ func (r *RoomserverInternalAPI) isInvitePending(
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, "", "", fmt.Errorf("r.DB.RoomInfo: %w", err)
|
return false, "", "", fmt.Errorf("r.DB.RoomInfo: %w", err)
|
||||||
}
|
}
|
||||||
|
if info == nil {
|
||||||
|
return false, "", "", fmt.Errorf("cannot get RoomInfo: unknown room ID %s", roomID)
|
||||||
|
}
|
||||||
|
|
||||||
// Look up the state key NID for the supplied user ID.
|
// Look up the state key NID for the supplied user ID.
|
||||||
targetUserNIDs, err := r.DB.EventStateKeyNIDs(ctx, []string{userID})
|
targetUserNIDs, err := r.DB.EventStateKeyNIDs(ctx, []string{userID})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue