mirror of
https://github.com/matrix-construct/construct
synced 2024-09-26 18:38:52 +02: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
|
bool
|
||||||
ircd::m::operator>=(const event &a, const event &b)
|
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);
|
return at<"depth"_>(a) >= at<"depth"_>(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ircd::m::operator<=(const event &a, const event &b)
|
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);
|
return at<"depth"_>(a) <= at<"depth"_>(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ircd::m::operator>(const event &a, const event &b)
|
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);
|
return at<"depth"_>(a) > at<"depth"_>(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ircd::m::operator<(const event &a, const event &b)
|
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);
|
return at<"depth"_>(a) < at<"depth"_>(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ircd::m::operator==(const event &a, const event &b)
|
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);
|
return at<"event_id"_>(a) == at<"event_id"_>(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue