Merge pull request #3472 from InspectorCaracal/patch-9

Exclude viewer from displayed contents
This commit is contained in:
Griatch 2024-04-03 21:50:09 +02:00 committed by GitHub
commit a02a71b7f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1434,7 +1434,7 @@ class DefaultObject(ObjectDB, metaclass=TypeclassBase):
return [
obj
for obj in obj_list
if (obj.access(looker, "view") and obj.access(looker, "search", default=True))
if obj != looker and (obj.access(looker, "view") and obj.access(looker, "search", default=True))
]
# name and return_appearance hooks