diff --git a/blocking.py b/blocking.py index d6ea622bc..7aa4ccb98 100644 --- a/blocking.py +++ b/blocking.py @@ -60,6 +60,10 @@ def addBlock(baseDir: str, nickname: str, domain: str, blockNickname: str, blockDomain: str) -> bool: """Block the given account """ + if blockDomain.startswith(domain) and nickname == blockNickname: + # don't block self + return False + domain = removeDomainPort(domain) blockingFilename = acctDir(baseDir, nickname, domain) + '/blocking.txt' blockHandle = blockNickname + '@' + blockDomain