Extract news item actor

main
Bob Mottram 2020-11-28 15:18:58 +00:00
parent ea28d9e004
commit 825dec73b8
1 changed files with 6 additions and 1 deletions

View File

@ -8870,11 +8870,16 @@ class PubServer(BaseHTTPRequestHandler):
"""Show the edit screen for a news post """Show the edit screen for a news post
""" """
if '/users/' in path and '/editnewspost=' in path: if '/users/' in path and '/editnewspost=' in path:
postActor = 'news'
if '?actor=' in path:
postActor = path.split('?actor=')[1]
if '?' in postActor:
postActor = postActor.split('?')[0]
postId = path.split('/editnewspost=')[1] postId = path.split('/editnewspost=')[1]
if '?' in postId: if '?' in postId:
postId = postId.split('?')[0] postId = postId.split('?')[0]
postUrl = httpPrefix + '://' + domainFull + \ postUrl = httpPrefix + '://' + domainFull + \
'/users/news/statuses/' + postId '/users/' + postActor + '/statuses/' + postId
path = path.split('/editnewspost=')[0] path = path.split('/editnewspost=')[0]
msg = htmlEditNewsPost(self.server.cssCache, msg = htmlEditNewsPost(self.server.cssCache,
translate, baseDir, translate, baseDir,