Replying to a shared item

merge-requests/8/head
Bob Mottram 2020-12-06 23:12:11 +00:00
parent cb228fe8da
commit 113a0a3c9e
1 changed files with 13 additions and 12 deletions

View File

@ -10543,21 +10543,22 @@ class PubServer(BaseHTTPRequestHandler):
for m in mentionsList: for m in mentionsList:
if m.startswith('mention='): if m.startswith('mention='):
replyHandle = m.replace('mention=', '') replyHandle = m.replace('mention=', '')
if m.replace('mention=', '') not in replyToList: inReplyToUrl = replyHandle
replyToList.append(m.replace('mention=', '')) if replyHandle not in replyToList:
if m.startswith('page='): replyToList.append(replyHandle)
elif m.startswith('page='):
replyPageStr = m.replace('page=', '') replyPageStr = m.replace('page=', '')
if replyPageStr.isdigit(): if replyPageStr.isdigit():
replyPageNumber = int(replyPageStr) replyPageNumber = int(replyPageStr)
# if m.startswith('actor='): elif m.startswith('sharedesc:'):
# replytoActor = m.replace('actor=', '') # get the title for the shared item
inReplyToUrl = mentionsList[0] shareDescription = \
if inReplyToUrl.startswith('sharedesc:'): m.replace('sharedesc:', '').strip()
shareDescription = \ shareDescription = \
inReplyToUrl.replace('sharedesc:', '') urllib.parse.unquote_plus(shareDescription)
shareDescription = \ shareDescription = \
urllib.parse.unquote_plus(shareDescription.strip()) shareDescription.replace('_', ' ')
shareDescription = shareDescription.replace('_', ' ')
self.path = self.path.split('?replydm=')[0]+'/newdm' self.path = self.path.split('?replydm=')[0]+'/newdm'
if self.server.debug: if self.server.debug:
print('DEBUG: replydm path ' + self.path) print('DEBUG: replydm path ' + self.path)