mirror of
https://github.com/matrix-construct/construct
synced 2025-03-14 05:20:17 +01:00
ircd:Ⓜ️ Handle and report id error in pretty oneline.
This commit is contained in:
parent
135d134c2c
commit
a9878ae5f7
1 changed files with 7 additions and 1 deletions
|
@ -472,8 +472,14 @@ ircd::m::pretty_oneline(std::ostream &s,
|
|||
|
||||
if(event.event_id && event.event_id.version() != "1")
|
||||
s << event.event_id << ' ';
|
||||
else if(!event.event_id)
|
||||
else if(!event.event_id) try
|
||||
{
|
||||
s << m::event::id::v4{sdbuf, event} << ' ';
|
||||
}
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
s << "$[" << e.what() << "] ";
|
||||
}
|
||||
|
||||
if(json::get<"origin_server_ts"_>(event) != json::undefined_number)
|
||||
s << smalldate(sdbuf, json::get<"origin_server_ts"_>(event) / 1000L) << ' ';
|
||||
|
|
Loading…
Add table
Reference in a new issue