0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

modules/console: Improve output formatting.

This commit is contained in:
Jason Volk 2020-03-02 18:32:49 -08:00
parent eaff4ccac5
commit cfc199d89e

View file

@ -7251,7 +7251,15 @@ console_cmd__event(opt &out, const string_view &line)
const auto &[authed, failmsg](m::room::auth::check_static(event)); const auto &[authed, failmsg](m::room::auth::check_static(event));
if(!authed) if(!authed)
out << std::setw(9) << std::left << "!!! ERROR" << " " out << std::setw(9) << std::left << "!!! ERROR" << " "
<< "UNAUTHORIZED STATIC :" << what(failmsg) << "STATICALLY UNAUTHORIZED :" << what(failmsg)
<< std::endl;
}
{
const auto &[authed, failmsg](m::room::auth::check_relative(event));
if(!authed)
out << std::setw(9) << std::left << "!!! ERROR" << " "
<< "RELATIVELY UNAUTHORIZED :" << what(failmsg)
<< std::endl; << std::endl;
} }
@ -7262,13 +7270,6 @@ console_cmd__event(opt &out, const string_view &line)
<< "PRESENTLY UNAUTHORIZED :" << what(failmsg) << "PRESENTLY UNAUTHORIZED :" << what(failmsg)
<< std::endl; << std::endl;
} }
{
const auto &[authed, failmsg](m::room::auth::check_relative(event));
if(!authed)
out << std::setw(9) << std::left << "!!! ERROR" << " "
<< "RELATIVELY UNAUTHORIZED :" << what(failmsg)
<< std::endl;
}
try try
{ {