From a9d11fc7f8d2b5244d21b75efe59d352468e121f Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 9 Sep 2019 21:35:54 +0100 Subject: use rpartition, not partition, to avoid splitting on leading @ --- modules/fediverse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/fediverse.py b/modules/fediverse.py index bcf5c7dc..f371f568 100644 --- a/modules/fediverse.py +++ b/modules/fediverse.py @@ -10,7 +10,7 @@ ACTIVITY_HEADERS = {"Accept": ("application/ld+json; " 'profile="https://www.w3.org/ns/activitystreams"')} def _parse_username(s): - username, _, instance = s.partition("@") + username, _, instance = s.rpartition("@") if username.startswith("@"): username = username[1:] if username and instance: -- cgit v1.3.1-10-gc9f91