Don't attempt to follow if the actor has no followers collection

merge-requests/30/head
Bob Mottram 2021-07-28 14:55:55 +01:00
parent 3b94048e28
commit 35f6921d7e
1 changed files with 4 additions and 1 deletions

View File

@ -202,7 +202,10 @@ def htmlProfileAfterSearch(cssCache: {},
domainFull = getFullDomain(domain, port) domainFull = getFullDomain(domain, port)
followIsPermitted = True followIsPermitted = True
if searchNickname == 'news' and searchDomainFull == domainFull: if not profileJson.get('followers'):
# no followers collection specified within actor
followIsPermitted = False
elif searchNickname == 'news' and searchDomainFull == domainFull:
# currently the news actor is not something you can follow # currently the news actor is not something you can follow
followIsPermitted = False followIsPermitted = False
elif searchNickname == nickname and searchDomainFull == domainFull: elif searchNickname == nickname and searchDomainFull == domainFull: