-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Allow guest users access to messages in rooms they have joined #587
Conversation
There should be no difference between guest users and non-guest users in terms of access to messages. Define the semantics of the is_peeking argument to filter_events_for_clients (slightly) better; interpret it appropriately, and set it correctly from /sync.
return membership == Membership.INVITE | ||
|
||
return True | ||
# presumably visibility is "joined"; we weren't a member at the | ||
# time of the event, so we're done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the server is supposed to assume that the room is "shared" if it doesn't understand the value of history_visibility.
https://matrix.org/speculator/spec/HEAD/client_server.html#id31
my bad. PTAL? |
@illicitonion: please take a look |
@illicitonion: please take a look. Any idea what the special-case for RoomHistoryVisibility which i've currently commented-out is for? it appears to have been introduced by @erikjohnston in 41938af |
I'm guessing that it was so that users can see when the visibility changes from |
""" Returns dict of user_id -> list of events that user is allowed to | ||
see. | ||
|
||
:param (str, bool) user_tuples: (user id, is_peeking) for each |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Param style is wrong here; should be:
Args:
argname (type): Description
(and below)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. At least, that is not the convention we agreed last time it was discussed, which was https://www.jetbrains.com/pycharm/help/type-hinting-in-pycharm.html#legacy.
drop commented-out special casing for historyvisibility event s/he/they/ for users
LGTM |
Allow guest users access to messages in rooms they have joined
There should be no difference between guest users and non-guest users in terms
of access to messages. Define the semantics of the is_peeking argument to
filter_events_for_clients (slightly) better; interpret it appropriately, and
set it correctly from /sync.
(fixes element-hq/element-web#949)