mirror of
https://github.com/matrix-construct/construct
synced 2025-02-18 09:40:12 +01:00
ircd:Ⓜ️:event: Relax the comparison operator room_id assertion.
This commit is contained in:
parent
ce425b438d
commit
0772e462bb
1 changed files with 5 additions and 5 deletions
|
@ -3716,35 +3716,35 @@ ircd::m::before(const event &a,
|
|||
bool
|
||||
ircd::m::operator>=(const event &a, const event &b)
|
||||
{
|
||||
assert(json::get<"room_id"_>(a) == json::get<"room_id"_>(b));
|
||||
//assert(json::get<"room_id"_>(a) == json::get<"room_id"_>(b));
|
||||
return at<"depth"_>(a) >= at<"depth"_>(b);
|
||||
}
|
||||
|
||||
bool
|
||||
ircd::m::operator<=(const event &a, const event &b)
|
||||
{
|
||||
assert(json::get<"room_id"_>(a) == json::get<"room_id"_>(b));
|
||||
//assert(json::get<"room_id"_>(a) == json::get<"room_id"_>(b));
|
||||
return at<"depth"_>(a) <= at<"depth"_>(b);
|
||||
}
|
||||
|
||||
bool
|
||||
ircd::m::operator>(const event &a, const event &b)
|
||||
{
|
||||
assert(json::get<"room_id"_>(a) == json::get<"room_id"_>(b));
|
||||
//assert(json::get<"room_id"_>(a) == json::get<"room_id"_>(b));
|
||||
return at<"depth"_>(a) > at<"depth"_>(b);
|
||||
}
|
||||
|
||||
bool
|
||||
ircd::m::operator<(const event &a, const event &b)
|
||||
{
|
||||
assert(json::get<"room_id"_>(a) == json::get<"room_id"_>(b));
|
||||
//assert(json::get<"room_id"_>(a) == json::get<"room_id"_>(b));
|
||||
return at<"depth"_>(a) < at<"depth"_>(b);
|
||||
}
|
||||
|
||||
bool
|
||||
ircd::m::operator==(const event &a, const event &b)
|
||||
{
|
||||
assert(json::get<"room_id"_>(a) == json::get<"room_id"_>(b));
|
||||
//assert(json::get<"room_id"_>(a) == json::get<"room_id"_>(b));
|
||||
return at<"event_id"_>(a) == at<"event_id"_>(b);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue