mirror of
https://github.com/matrix-construct/construct
synced 2024-09-30 04:38:52 +02:00
modules/m_event: Calculate unsigned.age relative to origin_server_ts.
This commit is contained in:
parent
a06816b66a
commit
3018062345
1 changed files with 2 additions and 2 deletions
|
@ -540,10 +540,10 @@ ircd::m::append(json::stack::object &object,
|
|||
{
|
||||
unsigned_, "age", json::value
|
||||
{
|
||||
has_event_idx && opts.age != std::numeric_limits<long>::min()?
|
||||
long(vm::sequence::retired - *opts.event_idx):
|
||||
opts.age != std::numeric_limits<long>::min()?
|
||||
opts.age:
|
||||
json::get<"origin_server_ts"_>(event)?
|
||||
ircd::time<milliseconds>() - json::get<"origin_server_ts"_>(event):
|
||||
0L
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue