Don't send actor updates to self

merge-requests/30/head
Bob Mottram 2021-03-18 23:25:27 +00:00
parent 014aacedc1
commit e4504593b6
1 changed files with 8 additions and 0 deletions

View File

@ -2511,6 +2511,14 @@ def sendToNamedAddresses(session, baseDir: str,
toDomain, toPort = getDomainFromActor(address)
if not toDomain:
continue
# Don't send profile/actor updates to yourself
if isProfileUpdate:
if nickname == toNickname and \
domainFull == toDomainFull:
if debug:
print('Not sending profile update to self. ' +
nickname + '@' + domainFull)
continue
if debug:
domainFull = getFullDomain(domain, port)
toDomainFull = getFullDomain(toDomain, toPort)