From ff4f67ca737e3de5d079ece2154f65840227621a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 21 Aug 2019 17:57:41 +0100 Subject: [PATCH] Unfollowing --- daemon.py | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/daemon.py b/daemon.py index c41625c1..05d4bd82 100644 --- a/daemon.py +++ b/daemon.py @@ -826,22 +826,21 @@ class PubServer(BaseHTTPRequestHandler): return # Unfollow a person from the web interface by selecting Unfollow on the dropdown - if htmlGET and '/users/' in self.path: - if '?unfollow=' in self.path: - followStr=self.path.split('?unfollow=')[1] - originPathStr=self.path.split('?unfollow=')[0] - if ';' in followStr: - followActor=followStr.split(';')[0] - followProfileUrl=followStr.split(';')[1] - # show the confirm follow screen - msg=htmlUnfollowConfirm(self.server.baseDir,originPathStr,followActor,followProfileUrl).encode() - self._set_headers('text/html',len(msg),cookie) - self.wfile.write(msg) - self.server.GETbusy=False - return - self._redirect_headers(originPathStr,cookie) - self.server.GETbusy=False - return + if '/users/' in self.path and '?unfollow=' in self.path: + followStr=self.path.split('?unfollow=')[1] + originPathStr=self.path.split('?unfollow=')[0] + if ';' in followStr: + followActor=followStr.split(';')[0] + followProfileUrl=followStr.split(';')[1] + # show the confirm follow screen + msg=htmlUnfollowConfirm(self.server.baseDir,originPathStr,followActor,followProfileUrl).encode() + self._set_headers('text/html',len(msg),cookie) + self.wfile.write(msg) + self.server.GETbusy=False + return + self._redirect_headers(originPathStr,cookie) + self.server.GETbusy=False + return # Unblock a person from the web interface by selecting Unblock on the dropdown if htmlGET and '/users/' in self.path: