0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 00:32:35 +01:00

ircd:Ⓜ️:event: Tweak age calculation.

This commit is contained in:
Jason Volk 2019-06-07 02:48:12 -07:00
parent b2bb7767a7
commit 0c7f5ef484

View file

@ -517,7 +517,7 @@ ircd::m::append(json::stack::object &object,
// "stick" at the bottom of the timeline. This may be advantageous
// in the future but for now we make sure the result is non-zero.
json::get<"depth"_>(event) >= 0 && opts.room_depth && *opts.room_depth >= 0L?
((*opts.room_depth + 1) - json::get<"depth"_>(event)) + 100:
(*opts.room_depth + 1 - json::get<"depth"_>(event)) + 1:
// We don't have depth information, so we use the origin_server_ts.
// It is bad if it conflicts with other appends in the room which