From 38ad16d0af12d33cbc4113453e40890991c0953c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 14 Dec 2021 15:25:57 +0000 Subject: [PATCH] Don't check actors which are already followed --- person.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/person.py b/person.py index 181e2ea8d..30214cc38 100644 --- a/person.py +++ b/person.py @@ -67,6 +67,7 @@ from pprint import pprint from cache import getPersonFromCache from cache import storePersonInCache from filters import isFilteredBio +from follow import isFollowingActor def generateRSAKey() -> (str, str): @@ -1656,6 +1657,10 @@ def validSendingActor(session, baseDir: str, # who sent this post? sendingActor = postJsonObject['actor'] + # If you are following them then allow their posts + if isFollowingActor(baseDir, nickname, domain, sendingActor): + return True + # sending to yourself (reminder) if sendingActor.endswith(domain + '/users/' + nickname): return True