See https://github.com/vector-im/element-web/issues/13706 for details
I've unfortunately been unable to reproduce this. I've been unable to get Element Web into a room as a guest. Can you provide more specific steps to reproduce?
It is only possible if Synapse joins them into that room, e.g using auto_join
I was able to confirm this:
#public:localhost:8480, which I created with a separate user:allow_guest_access: true
auto_join_rooms:
- "#public:localhost:8480"
auto_join_rooms_for_guests: true
Setup an Element Web that points to localhost:8480 by default
cp config.sample.json config.jsondefault_server_config keyServe Element Web locally: python -m http.server from the directory you unpacked Element Web in
This is a bit of an edge-case and it is unclear how much impact this is having on end-users. At the moment we're not going to prioritize this, but if anyone is keen to investigate further they can join #synapse-dev:matrix.org for help! On the surface it seems to be something with the serialize_event method.
I've unfortunately been unable to reproduce this. I've been unable to get Element Web into a room as a guest. Can you provide more specific steps to reproduce?
See vector-im/element-web#15567 and try the link there.
This is a bit of an edge-case and it is unclear how much impact this is having on end-users.
Basically it affects everyone coming to a specific matrix room from a click on a webpage, as a guest user, to simply chat, without even being aware that it's "something called matrix". As it is now it makes plainly _impossible to use_ since own messages accumulate at the bottom and new messages appear from the middle to top, possibly without even noticed and the user simply gives up and leaves.
This looks to be because guests use macaroons, which don't have an associated token_id:
So when we serialize the event we don't include the transaction ID:
To fix this we may want to pass in both a user_id and token_id and changing the guard to be if user_id is not None: .... I think only a couple of places call serialize_event while specifying a token_id so it shouldn't be too invasive
Most helpful comment
This looks to be because guests use macaroons, which don't have an associated
token_id:https://github.com/matrix-org/synapse/blob/34a5696f9338f1a1ec52203e3871a797a02138a9/synapse/api/auth.py#L357-L364
So when we serialize the event we don't include the transaction ID:
https://github.com/matrix-org/synapse/blob/34a5696f9338f1a1ec52203e3871a797a02138a9/synapse/events/utils.py#L305-L309
To fix this we may want to pass in both a
user_idandtoken_idand changing the guard to beif user_id is not None: .... I think only a couple of places callserialize_eventwhile specifying atoken_idso it shouldn't be too invasive