From ca2e127b01ccf8a5c99dd822c76d4086cbd12fda Mon Sep 17 00:00:00 2001 From: db0 Date: Wed, 27 Sep 2023 21:21:28 +0200 Subject: [PATCH] fix: prevent lemmy claims being sent with mastodon --- fediseer/apis/v1/whitelist.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fediseer/apis/v1/whitelist.py b/fediseer/apis/v1/whitelist.py index 8d0855a..66e04fb 100644 --- a/fediseer/apis/v1/whitelist.py +++ b/fediseer/apis/v1/whitelist.py @@ -88,6 +88,8 @@ class WhitelistDomain(Resource): if self.args.pm_proxy is not None: proxy = enums.PMProxy[self.args.pm_proxy] if instance.pm_proxy != proxy: + if proxy == enums.PMProxy.MASTODON and instance.software == "lemmy": + raise e.BadRequest("I'm sorry Dave, I can't let you do that. Lemmy is not capable of receiving mastodon PMs.") instance.pm_proxy = proxy api_key = activitypub_pm.pm_new_api_key( domain=domain,