forked from indymedia/epicyon
Set news flag on blog posts
parent
b647a38910
commit
5a695d689d
8
posts.py
8
posts.py
|
@ -580,8 +580,16 @@ def savePostToBox(baseDir: str, httpPrefix: str, postId: str,
|
||||||
postJsonObject['object']['id'] = postId
|
postJsonObject['object']['id'] = postId
|
||||||
postJsonObject['object']['atomUri'] = postId
|
postJsonObject['object']['atomUri'] = postId
|
||||||
|
|
||||||
|
# for blog posts set the news flag
|
||||||
|
if postId and postJsonObject['object'].get('type'):
|
||||||
|
if boxname == 'tlblogs' and \
|
||||||
|
postJsonObject['object']['type'] == 'Article':
|
||||||
|
if '://' + originalDomain + '/' in postId:
|
||||||
|
postJsonObject['news'] = True
|
||||||
|
|
||||||
boxDir = createPersonDir(nickname, domain, baseDir, boxname)
|
boxDir = createPersonDir(nickname, domain, baseDir, boxname)
|
||||||
filename = boxDir + '/' + postId.replace('/', '#') + '.json'
|
filename = boxDir + '/' + postId.replace('/', '#') + '.json'
|
||||||
|
|
||||||
saveJson(postJsonObject, filename)
|
saveJson(postJsonObject, filename)
|
||||||
return filename
|
return filename
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue