mirror of
https://github.com/matrix-construct/construct
synced 2024-11-26 08:42:34 +01:00
ircd:Ⓜ️ Add slightly arbitrary hook msgtype matching.
This commit is contained in:
parent
94087f6316
commit
2be4d22403
1 changed files with 6 additions and 0 deletions
|
@ -627,6 +627,12 @@ const
|
||||||
if(at<"membership"_>(matching) != json::get<"membership"_>(event))
|
if(at<"membership"_>(matching) != json::get<"membership"_>(event))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if(json::get<"content"_>(matching))
|
||||||
|
if(at<"type"_>(event) == "m.room.message")
|
||||||
|
if(at<"content"_>(matching).has("msgtype"))
|
||||||
|
if(at<"content"_>(matching).get("msgtype") != at<"content"_>(event).get("msgtype"))
|
||||||
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue