mirror of https://gitlab.com/bashrc2/epicyon
Check if announce object is blocked
parent
19bd904f89
commit
a8a90b9245
9
posts.py
9
posts.py
|
@ -1848,7 +1848,7 @@ def sendToFollowers(session,baseDir: str, \
|
||||||
postJsonObject['object']['type']=='Service':
|
postJsonObject['object']['type']=='Service':
|
||||||
print('Sending profile update to shared inbox of '+toDomain)
|
print('Sending profile update to shared inbox of '+toDomain)
|
||||||
toNickname='inbox'
|
toNickname='inbox'
|
||||||
|
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: Sending from '+nickname+'@'+domain+ \
|
print('DEBUG: Sending from '+nickname+'@'+domain+ \
|
||||||
' to '+toNickname+'@'+toDomain)
|
' to '+toNickname+'@'+toDomain)
|
||||||
|
@ -1883,7 +1883,7 @@ def sendToFollowers(session,baseDir: str, \
|
||||||
federationList, \
|
federationList, \
|
||||||
sendThreads,postLog,cachedWebfingers, \
|
sendThreads,postLog,cachedWebfingers, \
|
||||||
personCache,debug,projectVersion)
|
personCache,debug,projectVersion)
|
||||||
|
|
||||||
time.sleep(4)
|
time.sleep(4)
|
||||||
|
|
||||||
if debug:
|
if debug:
|
||||||
|
@ -2685,6 +2685,11 @@ def downloadAnnounce(session,baseDir: str,httpPrefix: str, \
|
||||||
if isBlocked(baseDir,nickname,domain,actorNickname,actorDomain):
|
if isBlocked(baseDir,nickname,domain,actorNickname,actorDomain):
|
||||||
print('Announce download blocked actor: '+actorNickname+'@'+actorDomain)
|
print('Announce download blocked actor: '+actorNickname+'@'+actorDomain)
|
||||||
return None
|
return None
|
||||||
|
objectNickname=getNicknameFromActor(postJsonObject['object'])
|
||||||
|
objectDomain,objectPort=getDomainFromActor(postJsonObject['object'])
|
||||||
|
if isBlocked(baseDir,nickname,domain,objectNickname,objectDomain):
|
||||||
|
print('Announce download blocked object: '+objectNickname+'@'+objectDomain)
|
||||||
|
return None
|
||||||
print('Downloading Announce content for '+postJsonObject['object'])
|
print('Downloading Announce content for '+postJsonObject['object'])
|
||||||
announcedJson= \
|
announcedJson= \
|
||||||
getJson(session,postJsonObject['object'],asHeader, \
|
getJson(session,postJsonObject['object'],asHeader, \
|
||||||
|
|
Loading…
Reference in New Issue