main
Bob Mottram 2020-08-20 13:11:07 +01:00
parent 28830ed660
commit a771ce3041
2 changed files with 5 additions and 6 deletions

View File

@ -202,14 +202,14 @@ def unfollowPerson(baseDir: str, nickname: str, domain: str,
if debug:
print('DEBUG: follow file ' + filename + ' was not found')
return False
if handleToUnfollow.lower() not in open(filename).read().lower():
handleToUnfollowLower = handleToUnfollow.lower()
if handleToUnfollowLower not in open(filename).read().lower():
if debug:
print('DEBUG: handle to unfollow ' + handleToUnfollow +
' is not in ' + filename)
return
with open(filename, "r") as f:
lines = f.readlines()
handleToUnfollowLower = handleToUnfollow.lower()
with open(filename, "w") as f:
for line in lines:
if line.strip("\n").strip("\r").lower() != handleToUnfollowLower:

View File

@ -706,9 +706,8 @@ def receiveUndoFollow(session, baseDir: str, httpPrefix: str,
nicknameFollowing, domainFollowingFull,
nicknameFollower, domainFollowerFull,
debug):
if debug:
print('DEBUG: Follower ' +
nicknameFollower + '@' + domainFollowerFull +
print(nicknameFollowing + '@' + domainFollowingFull + ': '
'Follower ' + nicknameFollower + '@' + domainFollowerFull +
' was removed')
return True