Don't check actors which are already followed

main
Bob Mottram 2021-12-14 15:25:57 +00:00
parent 2c295919e6
commit 38ad16d0af
1 changed files with 5 additions and 0 deletions

View File

@ -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