From e96783dfacaa4fe936335d15b4871cf6407369f9 Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 10 Sep 2019 16:51:08 +0100 Subject: [PATCH] support webfinger resource not having "acct:" on the front --- modules/fediverse.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/fediverse.py b/modules/fediverse.py index 69793b58..0b28f18b 100644 --- a/modules/fediverse.py +++ b/modules/fediverse.py @@ -152,9 +152,11 @@ class Module(ModuleManager.BaseModule): our_username, our_instance = self._ap_self() resource = event["params"].get("resource", None) - if resource and resource.startswith("acct:"): - request = resource.split(":", 1)[1] - requested_username, requested_instance = _parse_username(request) + if resource.startswith("acct:"): + resource = resource.split(":", 1)[1] + + if resource: + requested_username, requested_instance = _parse_username(resource) if (requested_username == our_username and requested_instance == our_instance):