Don't follow yourself

main
Bob Mottram 2022-07-21 11:18:11 +01:00
parent beb2c5c9c7
commit dcde5038ff
1 changed files with 4 additions and 0 deletions

View File

@ -68,6 +68,10 @@ def _update_import_following(base_dir: str,
following_domain, following_port = get_domain_from_actor(line) following_domain, following_port = get_domain_from_actor(line)
if not following_domain: if not following_domain:
continue continue
if following_nickname == nickname and \
following_domain == domain:
# don't follow yourself
continue
following_handle = following_nickname + '@' + following_domain following_handle = following_nickname + '@' + following_domain
if is_following_actor(base_dir, if is_following_actor(base_dir,
nickname, domain, following_handle): nickname, domain, following_handle):