mirror of
https://github.com/matrix-construct/construct
synced 2024-09-27 11:18:51 +02:00
ircd:Ⓜ️ Fix the existential room test.
This commit is contained in:
parent
0f00468bb8
commit
8fe92eea9b
1 changed files with 15 additions and 1 deletions
|
@ -1233,7 +1233,21 @@ ircd::m::exists(const id::room &room_id)
|
||||||
dbs::room_events.begin(room_id)
|
dbs::room_events.begin(room_id)
|
||||||
};
|
};
|
||||||
|
|
||||||
return bool(it);
|
if(!it)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
const auto &[depth, event_idx]
|
||||||
|
{
|
||||||
|
dbs::room_events_key(it->first)
|
||||||
|
};
|
||||||
|
|
||||||
|
if(likely(depth < 2UL))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if(my_host(room_id.host()) && creator(room_id, m::me))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
Loading…
Reference in a new issue