mirror of
https://github.com/matrix-construct/construct
synced 2024-11-19 16:30:52 +01:00
ircd:Ⓜ️🪝 Condition to match on membership field if available.
This commit is contained in:
parent
e259d7bad7
commit
5dbafa6a21
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}};
|
||||
|
||||
|
|
Loading…
Reference in a new issue