address review comments

drop commented-out special casing for historyvisibility event
s/he/they/ for users
This commit is contained in:
Richard van der Hoff 2016-02-22 15:27:44 +00:00
parent 6c5b147a39
commit 5be3944730
1 changed files with 2 additions and 7 deletions

View File

@ -106,23 +106,18 @@ class BaseHandler(object):
if membership == Membership.JOIN: if membership == Membership.JOIN:
return True return True
if event.type == EventTypes.RoomHistoryVisibility:
# XXX why are m.room.history_visibility events special?
# return True
pass
if visibility == "joined": if visibility == "joined":
# we weren't a member at the time of the event, so we can't # we weren't a member at the time of the event, so we can't
# see this event. # see this event.
return False return False
elif visibility == "invited": elif visibility == "invited":
# user can also see the event if he was *invited* at the time # user can also see the event if they were *invited* at the time
# of the event. # of the event.
return membership == Membership.INVITE return membership == Membership.INVITE
else: else:
# visibility is shared: user can also see the event if he has # visibility is shared: user can also see the event if they have
# become a member since the event # become a member since the event
# #
# XXX: if the user has subsequently joined and then left again, # XXX: if the user has subsequently joined and then left again,