diff --git a/modules/m_direct.cc b/modules/m_direct.cc index 75da8a519..9bf98797c 100644 --- a/modules/m_direct.cc +++ b/modules/m_direct.cc @@ -35,6 +35,7 @@ _join_room__m_direct_hookfn void _join_room__m_direct(const m::event &event, m::vm::eval &eval) +try { const m::user::id &user_id { @@ -125,3 +126,13 @@ _join_room__m_direct(const m::event &event, top.~object(); account_data.set("m.direct", json::object(out.completed())); } +catch(const std::exception &e) +{ + log::error + { + m::log, "Failure while setting m.direct account_data for %s in %s :%s", + json::get<"sender"_>(event), + json::get<"room_id"_>(event), + e.what() + }; +} diff --git a/modules/m_room_member.cc b/modules/m_room_member.cc index c9bffd975..cca549688 100644 --- a/modules/m_room_member.cc +++ b/modules/m_room_member.cc @@ -48,6 +48,7 @@ ircd::m::affect_user_room_hookfn void ircd::m::affect_user_room(const m::event &event, m::vm::eval &eval) +try { const auto &room_id { @@ -69,9 +70,24 @@ ircd::m::affect_user_room(const m::event &event, create(subject); //TODO: ABA / TXN - m::user::room user_room{subject}; + m::user::room user_room + { + subject + }; + send(user_room, sender, "ircd.member", room_id, at<"content"_>(event)); } +catch(const std::exception &e) +{ + log::error + { + log, "Failed to update user %s room for membership change in %s by %s :%s", + json::get<"state_key"_>(event), + json::get<"room_id"_>(event), + json::get<"sender"_>(event), + e.what() + }; +} decltype(ircd::m::auth_room_member_hookfn) ircd::m::auth_room_member_hookfn diff --git a/modules/m_vm.cc b/modules/m_vm.cc index f1d393f8a..fc447bad4 100644 --- a/modules/m_vm.cc +++ b/modules/m_vm.cc @@ -1088,18 +1088,6 @@ try { hook(event, std::forward(data)); } -catch(const ctx::interrupted &e) -{ - log::derror - { - "%s | phase:%s :%s", - loghead(eval), - unquote(hook.feature.get("name")), - e.what(), - }; - - throw; -} catch(const m::error &e) { log::derror