0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-23 21:33:44 +02:00

ircd:Ⓜ️:event: Relax the comparison operator room_id assertion.

This commit is contained in:
Jason Volk 2019-06-01 17:52:52 -07:00
parent ce425b438d
commit 0772e462bb

View file

@ -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);
}