mirror of
https://github.com/matrix-construct/construct
synced 2025-01-14 00:34:18 +01:00
modules/m_room: Make notification count iteration upper bound exclusive.
modules/m_user: Make highlight count iteration exclusive.
This commit is contained in:
parent
0e6e556d50
commit
be9bee5968
2 changed files with 2 additions and 2 deletions
|
@ -84,7 +84,7 @@ ircd::m::count_since(const m::room &room,
|
|||
size_t ret{0};
|
||||
// Hit the iterator once first otherwise the count will always increment
|
||||
// to `1` erroneously when it ought to show `0`.
|
||||
for(++it; it && it.event_idx() <= b; ++it, ++ret);
|
||||
for(++it; it && it.event_idx() < b; ++it, ++ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ highlighted_count__between(const user &user,
|
|||
};
|
||||
|
||||
size_t ret{0};
|
||||
for(++it; it && it.event_idx() <= b; ++it)
|
||||
for(++it; it && it.event_idx() < b; ++it)
|
||||
{
|
||||
const event &event{*it};
|
||||
ret += highlighted_event(event, user);
|
||||
|
|
Loading…
Reference in a new issue