Search for wanted items

merge-requests/30/head
Bob Mottram 2021-08-10 09:44:56 +01:00
parent 6901265ab3
commit 307a1c9e3b
2 changed files with 24 additions and 1 deletions

View File

@ -3160,6 +3160,29 @@ class PubServer(BaseHTTPRequestHandler):
self._write(msg)
self.server.POSTbusy = False
return
elif searchStr.startswith('.'):
# wanted items search
sharedItemsFederatedDomains = \
self.server.sharedItemsFederatedDomains
wantedItemsStr = \
htmlSearchSharedItems(self.server.cssCache,
self.server.translate,
baseDir,
searchStr[1:], pageNumber,
maxPostsInFeed,
httpPrefix,
domainFull,
actorStr, callingDomain,
sharedItemsFederatedDomains,
'wanted')
if wantedItemsStr:
msg = wantedItemsStr.encode('utf-8')
msglen = len(msg)
self._login_headers('text/html',
msglen, callingDomain)
self._write(msg)
self.server.POSTbusy = False
return
else:
# shared items search
sharedItemsFederatedDomains = \

View File

@ -90,7 +90,7 @@
"View": "View",
"Stop blocking": "Stop blocking",
"Enter an emoji name to search for": "Enter an emoji name to search for",
"Enter an address, shared item, 'history, #hashtag, *skill or :emoji: to search for": "Enter an address, shared item, -save, 'history, #hashtag, *skill or :emoji: to search for",
"Enter an address, shared item, 'history, #hashtag, *skill or :emoji: to search for": "Enter an address, shared item, -save, 'history, #hashtag, *skill, .wanted or :emoji: to search for",
"Go Back": "◀",
"Moderation Information": "Moderation Information",
"Suspended accounts": "Suspended accounts",