Do not propagate profile changes of shadow-banned users into rooms. (#8157)

This commit is contained in:
Patrick Cloke 2020-08-26 08:49:01 -04:00 committed by GitHub
parent e3c91a3c55
commit 2e6c90ff84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 291 additions and 160 deletions

View file

@ -380,7 +380,7 @@ class RoomMemberHandler(object):
# later on.
content = dict(content)
if not self.allow_per_room_profiles:
if not self.allow_per_room_profiles or requester.shadow_banned:
# Strip profile data, knowing that new profile data will be added to the
# event's content in event_creation_handler.create_event() using the target's
# global profile.