diff --git a/epicyon.py b/epicyon.py index b7b9d3bfd..60558b6dd 100644 --- a/epicyon.py +++ b/epicyon.py @@ -1725,6 +1725,10 @@ if args.followers: nickname = args.followers.split('/u/')[1] nickname = nickname.replace('\n', '').replace('\r', '') domain = args.followers.split('/u/')[0] + elif '/c/' in args.followers: + nickname = args.followers.split('/c/')[1] + nickname = nickname.replace('\n', '').replace('\r', '') + domain = args.followers.split('/c/')[0] else: # format: @nick@domain if '@' not in args.followers: @@ -1790,6 +1794,7 @@ if args.followers: personUrl = personUrl.replace('/channel/', '/actor/') personUrl = personUrl.replace('/profile/', '/actor/') personUrl = personUrl.replace('/u/', '/actor/') + personUrl = personUrl.replace('/c/', '/actor/') if not personUrl: # try single user instance personUrl = httpPrefix + '://' + domain diff --git a/follow.py b/follow.py index acae18889..b5a599bac 100644 --- a/follow.py +++ b/follow.py @@ -564,6 +564,8 @@ def _storeFollowRequest(baseDir: str, alreadyFollowing = True elif '://' + domainFull + '/u/' + nickname in followersStr: alreadyFollowing = True + elif '://' + domainFull + '/c/' + nickname in followersStr: + alreadyFollowing = True if alreadyFollowing: if debug: diff --git a/inbox.py b/inbox.py index 359a1300f..72558db30 100644 --- a/inbox.py +++ b/inbox.py @@ -14,6 +14,7 @@ import time import random from linked_data_sig import verifyJsonSignature from languages import understoodPostLanguage +from utils import getUserPaths from utils import getBaseContentFromPost from utils import acctDir from utils import removeDomainPort @@ -749,10 +750,10 @@ def _personReceiveUpdate(baseDir: str, ' ' + str(personJson)) domainFull = getFullDomain(domain, port) updateDomainFull = getFullDomain(updateDomain, updatePort) - usersPaths = ('users', 'profile', 'channel', 'accounts', 'u', 'c') + usersPaths = getUserPaths() usersStrFound = False for usersStr in usersPaths: - actor = updateDomainFull + '/' + usersStr + '/' + updateNickname + actor = updateDomainFull + usersStr + updateNickname if actor in personJson['id']: usersStrFound = True break