Users or profile

main2
Bob Mottram 2019-10-01 15:29:28 +01:00
parent 5b35225532
commit b49a6ff91b
1 changed files with 2 additions and 6 deletions

View File

@ -997,11 +997,9 @@ def receiveAnnounce(session,handle: str,baseDir: str, \
if postJsonObject['object'].get('attributedTo'): if postJsonObject['object'].get('attributedTo'):
lookupActor=postJsonObject['object']['attributedTo'] lookupActor=postJsonObject['object']['attributedTo']
if lookupActor: if lookupActor:
if '/users/' in lookupActor: if '/users/' in lookupActor or '/profile/' in lookupActor:
if '/statuses/' in lookupActor: if '/statuses/' in lookupActor:
lookupActor=lookupActor.split('/statuses/')[0] lookupActor=lookupActor.split('/statuses/')[0]
elif '/profile/' in lookupActor:
lookupActor=lookupActor.split('/profile/')[0]
if debug: if debug:
print('DEBUG: Obtaining actor for announce post '+lookupActor) print('DEBUG: Obtaining actor for announce post '+lookupActor)
@ -1200,11 +1198,9 @@ def obtainAvatarForReplyPost(session,baseDir: str,httpPrefix: str,domain: str,pe
lookupActor=postJsonObject['object']['inReplyTo'] lookupActor=postJsonObject['object']['inReplyTo']
if lookupActor: if lookupActor:
if '/users/' in lookupActor: if '/users/' in lookupActor or '/profile/' in lookupActor:
if '/statuses/' in lookupActor: if '/statuses/' in lookupActor:
lookupActor=lookupActor.split('/statuses/')[0] lookupActor=lookupActor.split('/statuses/')[0]
elif '/profile/' in lookupActor:
lookupActor=lookupActor.split('/profile/')[0]
if debug: if debug:
print('DEBUG: Obtaining actor for reply post '+lookupActor) print('DEBUG: Obtaining actor for reply post '+lookupActor)