mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-20 23:14:18 -05:00
a699c044b6
This is a requirement for [knocking](https://github.com/matrix-org/synapse/pull/6739), and is abstracting some code that was originally used by the invite flow. I'm separating it out into this PR as it's a fairly contained change. For a bit of context: when you invite a user to a room, you send them [stripped state events](https://matrix.org/docs/spec/server_server/unstable#put-matrix-federation-v2-invite-roomid-eventid) as part of `invite_room_state`. This is so that their client can display useful information such as the room name and avatar. The same requirement applies to knocking, as it would be nice for clients to be able to display a list of rooms you've knocked on - room name and avatar included. The reason we're sending membership events down as well is in the case that you are invited to a room that does not have an avatar or name set. In that case, the client should use the displayname/avatar of the inviter. That information is located in the inviter's membership event. This is optional as knocks don't really have any user in the room to link up to. When you knock on a room, your knock is sent by you and inserted into the room. It wouldn't *really* make sense to show the avatar of a random user - plus it'd be a data leak. So I've opted not to send membership events to the client here. The UX on the client for when you knock on a room without a name/avatar is a separate problem. In essence this is just moving some inline code to a reusable store method. |
||
---|---|---|
.. | ||
ui_auth | ||
__init__.py | ||
_base.py | ||
account_data.py | ||
account_validity.py | ||
acme_issuing_service.py | ||
acme.py | ||
admin.py | ||
appservice.py | ||
auth.py | ||
cas_handler.py | ||
deactivate_account.py | ||
device.py | ||
devicemessage.py | ||
directory.py | ||
e2e_keys.py | ||
e2e_room_keys.py | ||
events.py | ||
federation.py | ||
groups_local.py | ||
identity.py | ||
initial_sync.py | ||
message.py | ||
oidc_handler.py | ||
pagination.py | ||
password_policy.py | ||
presence.py | ||
profile.py | ||
read_marker.py | ||
receipts.py | ||
register.py | ||
room_list.py | ||
room_member_worker.py | ||
room_member.py | ||
room.py | ||
saml_handler.py | ||
search.py | ||
set_password.py | ||
state_deltas.py | ||
stats.py | ||
sync.py | ||
typing.py | ||
user_directory.py |