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:
parent
8b9822e4fb
commit
bef1c1e043
1 changed files with 12 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue