mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 23:40:57 +01:00
modules/client/sync: Fix index minmax for stable notification counting.
This commit is contained in:
parent
2c054ec9ca
commit
d5c3724428
1 changed files with 2 additions and 2 deletions
|
@ -1209,7 +1209,7 @@ ircd::m::sync::highlight_count(const room &r,
|
|||
"m_user", "highlighted_count__between"
|
||||
};
|
||||
|
||||
return count(u, r, std::min(a, b), std::max(a, b));
|
||||
return count(u, r, a, a < b? b : a);
|
||||
}
|
||||
|
||||
long
|
||||
|
@ -1217,5 +1217,5 @@ ircd::m::sync::notification_count(const room &room,
|
|||
const event::idx &a,
|
||||
const event::idx &b)
|
||||
{
|
||||
return m::count_since(room, std::min(a, b), std::max(a, b));
|
||||
return m::count_since(room, a, a < b? b : a);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue