0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-19 08:21:09 +01:00

modules/m_event: Improve pretty_oneline() for edu's.

This commit is contained in:
Jason Volk 2019-01-10 13:56:44 -08:00
parent 4c495e1f44
commit f1d5b0798e

View file

@ -150,8 +150,16 @@ pretty_oneline__event(std::ostream &s,
"sender",
};
s << json::get<"room_id"_>(event) << " ";
s << json::get<"depth"_>(event) << " :";
if(defined(json::get<"room_id"_>(event)))
s << json::get<"room_id"_>(event) << " ";
else
s << "* ";
if(json::get<"depth"_>(event) != json::undefined_number)
s << json::get<"depth"_>(event) << " :";
else
s << "* :";
json::for_each(event, top_keys, out);
const auto &auth_events{json::get<"auth_events"_>(event)};