0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-27 11:18:51 +02:00

ircd:Ⓜ️ Add slightly arbitrary hook msgtype matching.

This commit is contained in:
Jason Volk 2018-03-02 21:13:11 -08:00
parent 94087f6316
commit 2be4d22403

View file

@ -627,6 +627,12 @@ const
if(at<"membership"_>(matching) != json::get<"membership"_>(event))
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;
}