diff --git a/modules/fediverse.py b/modules/fediverse.py index 5cd0ec45..ea2a79a5 100644 --- a/modules/fediverse.py +++ b/modules/fediverse.py @@ -9,7 +9,9 @@ ACTIVITY_HEADERS = {"Accept": ("application/ld+json; " 'profile="https://www.w3.org/ns/activitystreams"')} def _parse_username(s): - username, _, instance = s.lstrip("@").partition("@") + username, _, instance = s.partition("@") + if username.startswith("@"): + username = username[1:] if username and instance: return "@%s@%s" % (username, instance) return None