mirror of
https://mau.dev/maunium/synapse.git
synced 2024-09-05 00:52:20 +00:00
Interpret unknown visibilities the same as shared
This commit is contained in:
parent
05aee12652
commit
6c5b147a39
@ -111,22 +111,24 @@ class BaseHandler(object):
|
|||||||
# return True
|
# return True
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if visibility == "shared":
|
if visibility == "joined":
|
||||||
# user can also see the event if he has become a member since
|
# we weren't a member at the time of the event, so we can't
|
||||||
# the event
|
# see this event.
|
||||||
#
|
return False
|
||||||
# XXX: if the user has subsequently joined and then left again,
|
|
||||||
# ideally we would share history up to the point they left. But
|
|
||||||
# we don't know when they left.
|
|
||||||
return not is_peeking
|
|
||||||
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 he was *invited* at the time
|
||||||
# of the event.
|
# of the event.
|
||||||
return membership == Membership.INVITE
|
return membership == Membership.INVITE
|
||||||
|
|
||||||
# presumably visibility is "joined"; we weren't a member at the
|
else:
|
||||||
# time of the event, so we're done.
|
# visibility is shared: user can also see the event if he has
|
||||||
return False
|
# become a member since the event
|
||||||
|
#
|
||||||
|
# XXX: if the user has subsequently joined and then left again,
|
||||||
|
# ideally we would share history up to the point they left. But
|
||||||
|
# we don't know when they left.
|
||||||
|
return not is_peeking
|
||||||
|
|
||||||
defer.returnValue({
|
defer.returnValue({
|
||||||
user_id: [
|
user_id: [
|
||||||
|
Loading…
Reference in New Issue
Block a user