0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-04 14:48:56 +02:00

modules/client/sync: Ensure indexes are a < b.

This commit is contained in:
Jason Volk 2018-09-15 19:32:16 -07:00
parent c06c119ef9
commit 17e137f52a

View file

@ -1197,7 +1197,7 @@ ircd::m::sync::highlight_count(const room &r,
"m_user", "highlighted_count__between" "m_user", "highlighted_count__between"
}; };
return count(u, r, a, b); return count(u, r, std::min(a, b), std::max(a, b));
} }
long long
@ -1205,5 +1205,5 @@ ircd::m::sync::notification_count(const room &room,
const event::idx &a, const event::idx &a,
const event::idx &b) const event::idx &b)
{ {
return m::count_since(room, a, b); return m::count_since(room, std::min(a, b), std::max(a, b));
} }