From 5dbafa6a21fae17024eb39d560db55ade7955cf4 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 26 Feb 2018 00:12:03 -0800 Subject: [PATCH] ircd::m::hook: Condition to match on membership field if available. --- ircd/m/m.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ircd/m/m.cc b/ircd/m/m.cc index fbb322310..77bc0cf14 100644 --- a/ircd/m/m.cc +++ b/ircd/m/m.cc @@ -591,6 +591,10 @@ ircd::m::hook::site::operator()(const event &event) if(at<"state_key"_>(hook.matching) != json::get<"state_key"_>(event)) return false; + if(json::get<"membership"_>(hook.matching)) + if(at<"membership"_>(hook.matching) != json::get<"membership"_>(event)) + return false; + return true; }};