0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-30 04:38:52 +02:00

modules/m_room_join_rules: Add infolog message on notify.

This commit is contained in:
Jason Volk 2018-10-25 18:07:46 -07:00
parent 1998105c96
commit 57a46d8f92

View file

@ -54,3 +54,27 @@ _changed_rules_hookfn
{ "type", "m.room.join_rules" },
}
};
static void
_changed_rules_notify(const m::event &event,
m::vm::eval &)
{
log::info
{
"%s changed join_rules in %s [%s] to %s",
json::get<"sender"_>(event),
json::get<"room_id"_>(event),
json::get<"event_id"_>(event),
json::get<"content"_>(event).get("join_rule"),
};
}
const m::hookfn<m::vm::eval &>
_changed_rules_notify_hookfn
{
_changed_rules_notify,
{
{ "_site", "vm.notify" },
{ "type", "m.room.join_rules" },
}
};