mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 23:40:57 +01:00
modules/m_room_join_rules: Add infolog message on notify.
This commit is contained in:
parent
1998105c96
commit
57a46d8f92
1 changed files with 24 additions and 0 deletions
|
@ -54,3 +54,27 @@ _changed_rules_hookfn
|
||||||
{ "type", "m.room.join_rules" },
|
{ "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" },
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in a new issue