mirror of
https://github.com/matrix-construct/construct
synced 2024-11-30 02:32:43 +01:00
modules/m_event: Tweak age calculation relation.
This commit is contained in:
parent
65e58a1787
commit
8299fd695b
1 changed files with 2 additions and 2 deletions
|
@ -543,10 +543,10 @@ ircd::m::append(json::stack::object &object,
|
||||||
opts.age != std::numeric_limits<long>::min()?
|
opts.age != std::numeric_limits<long>::min()?
|
||||||
opts.age:
|
opts.age:
|
||||||
json::get<"depth"_>(event) >= 0 && opts.room_depth && *opts.room_depth >= 0L?
|
json::get<"depth"_>(event) >= 0 && opts.room_depth && *opts.room_depth >= 0L?
|
||||||
(*opts.room_depth - json::get<"depth"_>(event)) + 1:
|
((*opts.room_depth + 1) - json::get<"depth"_>(event)) + 100:
|
||||||
!opts.room_depth && json::get<"origin_server_ts"_>(event)?
|
!opts.room_depth && json::get<"origin_server_ts"_>(event)?
|
||||||
ircd::time<milliseconds>() - json::get<"origin_server_ts"_>(event):
|
ircd::time<milliseconds>() - json::get<"origin_server_ts"_>(event):
|
||||||
1L
|
json::undefined_number
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue