View button on search screen

main2
Bob Mottram 2019-10-23 16:48:06 +01:00
parent 0f643a94ea
commit 0088ae2aac
2 changed files with 8 additions and 1 deletions

View File

@ -3443,6 +3443,13 @@ class PubServer(BaseHTTPRequestHandler):
followerNickname=getNicknameFromActor(originPathStr)
length = int(self.headers['Content-length'])
followConfirmParams=self.rfile.read(length).decode('utf-8')
if '&submitView=' in followConfirmParams:
followingActor=followConfirmParams.replace('%3A',':').replace('%2F','/').split('actor=')[1]
if '&' in followingActor:
followingActor=followingActor.split('&')[0]
self._redirect_headers(followingActor,cookie)
self.server.POSTbusy=False
return
if '&submitYes=' in followConfirmParams:
followingActor=followConfirmParams.replace('%3A',':').replace('%2F','/').split('actor=')[1]
if '&' in followingActor:

View File

@ -3258,7 +3258,7 @@ def htmlProfileAfterSearch(translate: {}, \
' <center>' \
' <input type="hidden" name="actor" value="'+personUrl+'">' \
' <button type="submit" class="button" name="submitYes">'+translate['Follow']+'</button>' \
' <a href="'+personUrl+'"><button class="button">'+translate['View']+'</button></a>' \
' <button type="submit" class="button" name="submitView">'+translate['View']+'</button>' \
' <a href="'+backUrl+'"><button class="button">'+translate['Go Back']+'</button></a>' \
' </center>' \
' </form>' \