forked from indymedia/epicyon
Tidying
parent
c1acbf0deb
commit
5c6ca46d8b
54
inbox.py
54
inbox.py
|
@ -993,22 +993,20 @@ def receiveAnnounce(session,handle: str,baseDir: str, \
|
||||||
lookupActor=postJsonObject['object']['attributedTo']
|
lookupActor=postJsonObject['object']['attributedTo']
|
||||||
if lookupActor:
|
if lookupActor:
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: Obtaining actor for announce post from cache '+lookupActor)
|
print('DEBUG: Obtaining actor for announce post '+lookupActor)
|
||||||
if not getPersonFromCache(baseDir,lookupActor,personCache):
|
for tries in range(6):
|
||||||
print('DEBUG: retrieve actor for announce post '+lookupActor)
|
pubKey= \
|
||||||
for tries in range(3):
|
getPersonPubKey(baseDir,session,lookupActor, \
|
||||||
pubKey= \
|
personCache,debug, \
|
||||||
getPersonPubKey(baseDir,session,lookupActor, \
|
__version__,httpPrefix,domain)
|
||||||
personCache,debug, \
|
if pubKey:
|
||||||
__version__,httpPrefix,domain)
|
print('DEBUG: public key obtained for announce: '+str(pubKey))
|
||||||
if pubKey:
|
break
|
||||||
print('DEBUG: public key: '+str(pubKey))
|
|
||||||
break
|
|
||||||
|
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: Retry '+str(tries+1)+ \
|
print('DEBUG: Retry '+str(tries+1)+ \
|
||||||
' obtaining actor for '+lookupActor)
|
' obtaining actor for '+lookupActor)
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: announced/repeated post arrived in inbox')
|
print('DEBUG: announced/repeated post arrived in inbox')
|
||||||
return True
|
return True
|
||||||
|
@ -1193,21 +1191,19 @@ def obtainAvatarForReplyPost(session,baseDir: str,httpPrefix: str,domain: str,pe
|
||||||
if lookupActor:
|
if lookupActor:
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: Obtaining actor for reply post '+lookupActor)
|
print('DEBUG: Obtaining actor for reply post '+lookupActor)
|
||||||
if not getPersonFromCache(baseDir,lookupActor,personCache):
|
for tries in range(6):
|
||||||
print('DEBUG: retrieve actor for announce post '+lookupActor)
|
pubKey= \
|
||||||
for tries in range(3):
|
getPersonPubKey(baseDir,session,lookupActor, \
|
||||||
pubKey= \
|
personCache,debug, \
|
||||||
getPersonPubKey(baseDir,session,lookupActor, \
|
__version__,httpPrefix,domain)
|
||||||
personCache,debug, \
|
if pubKey:
|
||||||
__version__,httpPrefix,domain)
|
print('DEBUG: public key obtained for reply: '+str(pubKey))
|
||||||
if pubKey:
|
break
|
||||||
print('DEBUG: public key: '+str(pubKey))
|
|
||||||
break
|
|
||||||
|
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: Retry '+str(tries+1)+ \
|
print('DEBUG: Retry '+str(tries+1)+ \
|
||||||
' obtaining actor for '+lookupActor)
|
' obtaining actor for '+lookupActor)
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
|
||||||
def inboxAfterCapabilities(session,keyId: str,handle: str,messageJson: {}, \
|
def inboxAfterCapabilities(session,keyId: str,handle: str,messageJson: {}, \
|
||||||
baseDir: str,httpPrefix: str,sendThreads: [], \
|
baseDir: str,httpPrefix: str,sendThreads: [], \
|
||||||
|
|
Loading…
Reference in New Issue