forked from indymedia/epicyon
Fix posts
parent
efb713f4de
commit
03a43f64f1
|
@ -134,7 +134,7 @@ if args.posts:
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
if args.postsraw:
|
if args.postsraw:
|
||||||
if '@' not in args.posts:
|
if '@' not in args.postsraw:
|
||||||
print('Syntax: --postsraw nickname@domain')
|
print('Syntax: --postsraw nickname@domain')
|
||||||
sys.exit()
|
sys.exit()
|
||||||
nickname=args.postsraw.split('@')[0]
|
nickname=args.postsraw.split('@')[0]
|
||||||
|
@ -344,7 +344,7 @@ if args.testdata:
|
||||||
followerOfPerson(baseDir,nickname,domain,'admin',domain,federationList,True)
|
followerOfPerson(baseDir,nickname,domain,'admin',domain,federationList,True)
|
||||||
createPublicPost(baseDir,nickname,domain,port,httpPrefix,"like, this is totally just a test, man",False,True,False,capsList)
|
createPublicPost(baseDir,nickname,domain,port,httpPrefix,"like, this is totally just a test, man",False,True,False,capsList)
|
||||||
createPublicPost(baseDir,nickname,domain,port,httpPrefix,"Zoiks!!!",False,True,False,capsList)
|
createPublicPost(baseDir,nickname,domain,port,httpPrefix,"Zoiks!!!",False,True,False,capsList)
|
||||||
createPublicPost(baseDir,nickname,domain,port,httpPrefix,"Hey scoob we need more milkshakes",False,True,False,capsList)
|
createPublicPost(baseDir,nickname,domain,port,httpPrefix,"Hey scoob we need like a hundred more milkshakes",False,True,False,capsList)
|
||||||
createPublicPost(baseDir,nickname,domain,port,httpPrefix,"Getting kinda spooky around here",False,True,False,capsList)
|
createPublicPost(baseDir,nickname,domain,port,httpPrefix,"Getting kinda spooky around here",False,True,False,capsList)
|
||||||
createPublicPost(baseDir,nickname,domain,port,httpPrefix,"And they would have gotten away with it too if it wasn't for those pesky hackers",False,True,False,capsList)
|
createPublicPost(baseDir,nickname,domain,port,httpPrefix,"And they would have gotten away with it too if it wasn't for those pesky hackers",False,True,False,capsList)
|
||||||
createPublicPost(baseDir,nickname,domain,port,httpPrefix,"man, these centralized sites are, like, the worst!",False,True,False,capsList)
|
createPublicPost(baseDir,nickname,domain,port,httpPrefix,"man, these centralized sites are, like, the worst!",False,True,False,capsList)
|
||||||
|
|
7
posts.py
7
posts.py
|
@ -227,7 +227,7 @@ def getPosts(session,outboxUrl: str,maxPosts: int,maxMentions: int, \
|
||||||
if item['object']['conversation']:
|
if item['object']['conversation']:
|
||||||
# no conversations originated in non-permitted domains
|
# no conversations originated in non-permitted domains
|
||||||
if urlPermitted(item['object']['conversation'], \
|
if urlPermitted(item['object']['conversation'], \
|
||||||
federationList,"objects:read"):
|
federationList,capsList,"objects:read"):
|
||||||
conversation = item['object']['conversation']
|
conversation = item['object']['conversation']
|
||||||
|
|
||||||
attachment = []
|
attachment = []
|
||||||
|
@ -812,6 +812,7 @@ def getPublicPostsOfPerson(nickname: str,domain: str, \
|
||||||
personCache={}
|
personCache={}
|
||||||
cachedWebfingers={}
|
cachedWebfingers={}
|
||||||
federationList=[]
|
federationList=[]
|
||||||
|
capsList=[]
|
||||||
|
|
||||||
httpPrefix='https'
|
httpPrefix='https'
|
||||||
handle=httpPrefix+"://"+domain+"/@"+nickname
|
handle=httpPrefix+"://"+domain+"/@"+nickname
|
||||||
|
@ -828,6 +829,6 @@ def getPublicPostsOfPerson(nickname: str,domain: str, \
|
||||||
maxEmoji=10
|
maxEmoji=10
|
||||||
maxAttachments=5
|
maxAttachments=5
|
||||||
userPosts = getPosts(session,personUrl,30,maxMentions,maxEmoji, \
|
userPosts = getPosts(session,personUrl,30,maxMentions,maxEmoji, \
|
||||||
maxAttachments,federationList,personCache, \
|
maxAttachments,federationList,capsList, \
|
||||||
raw,simple)
|
personCache,raw,simple)
|
||||||
#print(str(userPosts))
|
#print(str(userPosts))
|
||||||
|
|
Loading…
Reference in New Issue