From 3016ba25cb3d73538f24e3597a44cf866df0c0ba Mon Sep 17 00:00:00 2001 From: Olivier Date: Wed, 5 Jan 2022 14:51:05 +0000 Subject: [PATCH] Use glob_to_regex from matrix-common --- synapse_antispam/mjolnir/list_rule.py | 2 +- synapse_antispam/setup.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/synapse_antispam/mjolnir/list_rule.py b/synapse_antispam/mjolnir/list_rule.py index 763e59c..db4cf9f 100644 --- a/synapse_antispam/mjolnir/list_rule.py +++ b/synapse_antispam/mjolnir/list_rule.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from synapse.util import glob_to_regex +from matrix_common.regex import glob_to_regex RECOMMENDATION_BAN = "m.ban" RECOMMENDATION_BAN_TYPES = [RECOMMENDATION_BAN, "org.matrix.mjolnir.ban"] diff --git a/synapse_antispam/setup.py b/synapse_antispam/setup.py index 53bcf4d..3cc00a8 100644 --- a/synapse_antispam/setup.py +++ b/synapse_antispam/setup.py @@ -7,5 +7,7 @@ setup( description="Mjolnir Antispam", include_package_data=True, zip_safe=True, - install_requires=[], + install_requires=[ + "matrix-common >= 1.0.0" + ], )