diff --git a/follow.py b/follow.py index cc4f6985..f3258b7f 100644 --- a/follow.py +++ b/follow.py @@ -363,6 +363,8 @@ def receiveFollowRequest(session,baseDir: str,httpPrefix: str, \ if debug: print('DEBUG: follow request does not contain a nickname') return False + if not messageJson.get('to'): + messageJson['to']=messageJson['object'] handle=nickname.lower()+'@'+domain.lower() if '/users/' not in messageJson['object']: if debug: diff --git a/inbox.py b/inbox.py index ee4a2869..eb1db990 100644 --- a/inbox.py +++ b/inbox.py @@ -445,7 +445,9 @@ def receiveUndoFollow(session,baseDir: str,httpPrefix: str, \ if debug: print('DEBUG: actors do not match') return False - + if not messageJson['object'].get('to'): + messageJson['object']['to']=messageJson['object']['object'] + nicknameFollower=getNicknameFromActor(messageJson['object']['actor']) domainFollower,portFollower=getDomainFromActor(messageJson['object']['actor']) domainFollowerFull=domainFollower