mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
a29af6581e
commit
15e2805d69
47
inbox.py
47
inbox.py
|
@ -1287,28 +1287,33 @@ def obtainAvatarForReplyPost(session,baseDir: str,httpPrefix: str,domain: str,pe
|
||||||
return
|
return
|
||||||
|
|
||||||
lookupActor=postJsonObject['object']['inReplyTo']
|
lookupActor=postJsonObject['object']['inReplyTo']
|
||||||
if lookupActor:
|
if not lookupActor:
|
||||||
if '/users/' in lookupActor or \
|
return
|
||||||
'/channel/' in lookupActor or \
|
|
||||||
'/profile/' in lookupActor:
|
|
||||||
if '/statuses/' in lookupActor:
|
|
||||||
lookupActor=lookupActor.split('/statuses/')[0]
|
|
||||||
|
|
||||||
if debug:
|
|
||||||
print('DEBUG: Obtaining actor for reply post '+lookupActor)
|
|
||||||
for tries in range(6):
|
|
||||||
pubKey= \
|
|
||||||
getPersonPubKey(baseDir,session,lookupActor, \
|
|
||||||
personCache,debug, \
|
|
||||||
__version__,httpPrefix,domain)
|
|
||||||
if pubKey:
|
|
||||||
print('DEBUG: public key obtained for reply: '+lookupActor)
|
|
||||||
break
|
|
||||||
|
|
||||||
if debug:
|
if not ('/users/' in lookupActor or \
|
||||||
print('DEBUG: Retry '+str(tries+1)+ \
|
'/channel/' in lookupActor or \
|
||||||
' obtaining actor for '+lookupActor)
|
'/profile/' in lookupActor):
|
||||||
time.sleep(5)
|
return
|
||||||
|
|
||||||
|
if '/statuses/' in lookupActor:
|
||||||
|
lookupActor=lookupActor.split('/statuses/')[0]
|
||||||
|
|
||||||
|
if debug:
|
||||||
|
print('DEBUG: Obtaining actor for reply post '+lookupActor)
|
||||||
|
|
||||||
|
for tries in range(6):
|
||||||
|
pubKey= \
|
||||||
|
getPersonPubKey(baseDir,session,lookupActor, \
|
||||||
|
personCache,debug, \
|
||||||
|
__version__,httpPrefix,domain)
|
||||||
|
if pubKey:
|
||||||
|
print('DEBUG: public key obtained for reply: '+lookupActor)
|
||||||
|
break
|
||||||
|
|
||||||
|
if debug:
|
||||||
|
print('DEBUG: Retry '+str(tries+1)+ \
|
||||||
|
' obtaining actor for '+lookupActor)
|
||||||
|
time.sleep(5)
|
||||||
|
|
||||||
def dmNotify(baseDir: str,handle: str,url: str) -> None:
|
def dmNotify(baseDir: str,handle: str,url: str) -> None:
|
||||||
"""Creates a notification that a new DM has arrived
|
"""Creates a notification that a new DM has arrived
|
||||||
|
|
Loading…
Reference in New Issue