From 35f6921d7e55ed7984eca2c4a2a4dc9294faf6ff Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 28 Jul 2021 14:55:55 +0100 Subject: [PATCH] Don't attempt to follow if the actor has no followers collection --- webapp_profile.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webapp_profile.py b/webapp_profile.py index 30a66a0d2..b14f32c66 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -202,7 +202,10 @@ def htmlProfileAfterSearch(cssCache: {}, domainFull = getFullDomain(domain, port) 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 followIsPermitted = False elif searchNickname == nickname and searchDomainFull == domainFull: