mirror of https://gitlab.com/bashrc2/epicyon
Handle single parameter case for replies
parent
113a0a3c9e
commit
4fe227f5a0
19
daemon.py
19
daemon.py
|
@ -10538,7 +10538,9 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
# for moderation posts or the dm timeline
|
||||
if '?replydm=' in self.path:
|
||||
inReplyToUrl = self.path.split('?replydm=')[1]
|
||||
inReplyToUrl = urllib.parse.unquote_plus(inReplyToUrl)
|
||||
if '?' in inReplyToUrl:
|
||||
# multiple parameters
|
||||
mentionsList = inReplyToUrl.split('?')
|
||||
for m in mentionsList:
|
||||
if m.startswith('mention='):
|
||||
|
@ -10554,12 +10556,23 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
# get the title for the shared item
|
||||
shareDescription = \
|
||||
m.replace('sharedesc:', '').strip()
|
||||
shareDescription = \
|
||||
urllib.parse.unquote_plus(shareDescription)
|
||||
shareDescription = \
|
||||
shareDescription.replace('_', ' ')
|
||||
else:
|
||||
# single parameter
|
||||
if inReplyToUrl.startswith('mention='):
|
||||
replyHandle = inReplyToUrl.replace('mention=', '')
|
||||
inReplyToUrl = replyHandle
|
||||
if replyHandle not in replyToList:
|
||||
replyToList.append(replyHandle)
|
||||
elif inReplyToUrl.startswith('sharedesc:'):
|
||||
# get the title for the shared item
|
||||
shareDescription = \
|
||||
inReplyToUrl.replace('sharedesc:', '').strip()
|
||||
shareDescription = \
|
||||
shareDescription.replace('_', ' ')
|
||||
|
||||
self.path = self.path.split('?replydm=')[0]+'/newdm'
|
||||
self.path = self.path.split('?replydm=')[0] + '/newdm'
|
||||
if self.server.debug:
|
||||
print('DEBUG: replydm path ' + self.path)
|
||||
|
||||
|
|
Loading…
Reference in New Issue