Don't allow the news or shared inbox accounts to be followed

main
Bob Mottram 2020-10-08 10:33:14 +01:00
parent a7cd3d160e
commit 014336606d
1 changed files with 4 additions and 0 deletions

View File

@ -574,6 +574,10 @@ def receiveFollowRequest(session, baseDir: str, httpPrefix: str,
print('DEBUG: follow request does not contain a ' +
'nickname for the account followed')
return True
if nicknameToFollow == 'news' or nicknameToFollow == 'inbox':
if debug:
print('DEBUG: Cannot follow the news or inbox accounts')
return True
handleToFollow = nicknameToFollow + '@' + domainToFollow
if domainToFollow == domain:
if not os.path.isdir(baseDir + '/accounts/' + handleToFollow):