Extra outbox search phrases

merge-requests/30/head
Bob Mottram 2021-11-29 10:07:49 +00:00
parent 8a623417bf
commit de8dc91341
1 changed files with 22 additions and 1 deletions

View File

@ -3193,7 +3193,28 @@ class PubServer(BaseHTTPRequestHandler):
self._write(msg)
self.server.POSTbusy = False
return
elif searchStr.startswith("'"):
elif (searchStr.startswith("'") or
searchStr.endswith(' history') or
searchStr.endswith(' in sent') or
searchStr.endswith(' in outbox') or
searchStr.endswith(' in my outbox') or
searchStr.endswith(' in sent items') or
searchStr.endswith(' in sent posts') or
searchStr.endswith(' in my posts')):
possibleEndings = (
' in my posts',
' in sent posts',
' in my history',
' in history',
' in sent',
' in outbox',
' in my outbox',
' in sent items',
' history'
)
for possEnding in possibleEndings:
if searchStr.endswith(possEnding):
searchStr = searchStr.replace(possEnding, '')
# your post history search
nickname = getNicknameFromActor(actorStr)
searchStr = searchStr.replace("'", '', 1).strip()