0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-02 13:48:53 +02:00

modules/m_room_create: Handle errors on created room effects hook. (Fixes #120)

This commit is contained in:
Jason Volk 2019-08-05 16:26:52 -07:00
parent 8b9822e4fb
commit bef1c1e043

View file

@ -40,6 +40,7 @@ ircd::m::created_room_hookfn
void void
ircd::m::created_room(const m::event &event, ircd::m::created_room(const m::event &event,
m::vm::eval &) m::vm::eval &)
try
{ {
const m::room::id &room_id const m::room::id &room_id
{ {
@ -62,6 +63,17 @@ ircd::m::created_room(const m::event &event,
string_view{event.event_id}, string_view{event.event_id},
}; };
} }
catch(const std::exception &e)
{
log::error
{
m::log, "Effect of creating room %s with %s by %s :%s",
json::get<"room_id"_>(event),
string_view{event.event_id},
json::get<"sender"_>(event),
e.what()
};
}
// //
// auth handler // auth handler