forked from indymedia/epicyon
Set capabilities filename when sending post
parent
3addf30a9b
commit
46a53072f3
4
posts.py
4
posts.py
|
@ -31,6 +31,7 @@ from utils import getStatusNumber
|
||||||
from utils import createPersonDir
|
from utils import createPersonDir
|
||||||
from utils import urlPermitted
|
from utils import urlPermitted
|
||||||
from capabilities import isCapable
|
from capabilities import isCapable
|
||||||
|
from capabilities import getOcapFilename
|
||||||
try:
|
try:
|
||||||
from BeautifulSoup import BeautifulSoup
|
from BeautifulSoup import BeautifulSoup
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -350,8 +351,7 @@ def createPostBase(baseDir: str,nickname: str, domain: str, port: int, \
|
||||||
# if capabilities have been granted for this actor
|
# if capabilities have been granted for this actor
|
||||||
# then get the corresponding id
|
# then get the corresponding id
|
||||||
capabilityId=None
|
capabilityId=None
|
||||||
ocapFilename= \
|
ocapFilename= getOcapFilename(baseDir,nickname,domain,actorUrl,'granted')
|
||||||
baseDir+'/ocap/granted/'+actorUrl.replace('/','#')+'.json'
|
|
||||||
if os.path.isfile(ocapFilename):
|
if os.path.isfile(ocapFilename):
|
||||||
with open(ocapFilename, 'r') as fp:
|
with open(ocapFilename, 'r') as fp:
|
||||||
oc=commentjson.load(fp)
|
oc=commentjson.load(fp)
|
||||||
|
|
Loading…
Reference in New Issue