mirror of https://gitlab.com/bashrc2/epicyon
Fix getting posts
parent
27858b70e9
commit
553349c3f2
12
epicyon.py
12
epicyon.py
|
@ -82,6 +82,12 @@ if args.testsnetwork:
|
|||
testPostMessageBetweenServers()
|
||||
sys.exit()
|
||||
|
||||
if args.posts:
|
||||
nickname=args.posts.split('@')[0]
|
||||
domain=args.posts.split('@')[1]
|
||||
getPublicPostsOfPerson(nickname,domain)
|
||||
sys.exit()
|
||||
|
||||
if not args.domain:
|
||||
print('Specify a domain with --domain [name]')
|
||||
sys.exit()
|
||||
|
@ -100,10 +106,4 @@ federationList=[]
|
|||
if args.federationList:
|
||||
federationList=args.federationList.copy()
|
||||
|
||||
if args.posts:
|
||||
nickname=args.posts.split('@')[0]
|
||||
domain=args.posts.split('@')[1]
|
||||
getPublicPostsOfPerson(nickname,domain)
|
||||
sys.exit()
|
||||
|
||||
runDaemon(domain,port,https,federationList,useTor)
|
||||
|
|
2
posts.py
2
posts.py
|
@ -22,6 +22,7 @@ from cache import storePersonInCache
|
|||
from cache import getPersonFromCache
|
||||
from pprint import pprint
|
||||
from random import randint
|
||||
from session import createSession
|
||||
from session import getJson
|
||||
from session import postJson
|
||||
from webfinger import webfingerHandle
|
||||
|
@ -541,6 +542,7 @@ def getPublicPostsOfPerson(nickname,domain):
|
|||
""" This is really just for test purposes
|
||||
"""
|
||||
useTor=True
|
||||
port=443
|
||||
session = createSession(domain,port,useTor)
|
||||
personCache={}
|
||||
cachedWebfingers={}
|
||||
|
|
Loading…
Reference in New Issue