Skip to content

change create.rs#365

Draft
donjuanplatinum wants to merge 1 commit intomatrix-construct:devfrom
donjuanplatinum:create_rs
Draft

change create.rs#365
donjuanplatinum wants to merge 1 commit intomatrix-construct:devfrom
donjuanplatinum:create_rs

Conversation

@donjuanplatinum
Copy link
Copy Markdown
Contributor

in the synapse room.py line 1690

        if config["guest_can_join"]:
            if (EventTypes.GuestAccess, "") not in initial_state:
                guest_access_event, guest_access_context = await create_event(
                    EventTypes.GuestAccess,
                    {EventContentFields.GUEST_ACCESS: GuestAccess.CAN_JOIN},
                    True,
                )
                events_to_send.append((guest_access_event, guest_access_context))

it says that: only guest_can_join == true, it will create and return guest_access event.

in the past tuwunel create.rs line 246 : it will create and return guest_access anyway.

	// 5.3 Guest Access
	services
		.timeline
		.build_and_append_pdu(
			PduBuilder::state(
				String::new(),
				&RoomGuestAccessEventContent::new(match preset {
					| RoomPreset::PublicChat => GuestAccess::Forbidden,
					| _ => GuestAccess::CanJoin,
				}),
			),
			sender_user,
			&room_id,
			&state_lock,
		)
		.boxed()
		.await?;

@jevolk jevolk requested a review from dasha-uwu March 12, 2026 08:12
@jevolk jevolk added the bug Something isn't right. label Mar 12, 2026
Copy link
Copy Markdown
Member

@dasha-uwu dasha-uwu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why should we do this? the spec doesn't say to. in fact it says the opposite:

It MUST apply the events implied by the request in the following order:
...
Events set by the preset. Currently these are the m.room.join_rules, m.room.history_visibility, and m.room.guest_access state events.

it doesn't say we should or just can skip the events. synapse is wrong here.

@jevolk jevolk marked this pull request as draft March 25, 2026 16:35
@jevolk
Copy link
Copy Markdown
Member

jevolk commented Mar 25, 2026

I have applied a workaround in Complement in lieu of this PR for now. We needed one or the other to merge #349. This is marked as draft so we can double-back on that decision as necessary.

@jevolk jevolk force-pushed the dev branch 13 times, most recently from 1555798 to d7ad21d Compare April 1, 2026 08:00
@jevolk jevolk force-pushed the dev branch 8 times, most recently from fe07e74 to f91e1e4 Compare April 6, 2026 05:12
@jevolk jevolk force-pushed the dev branch 2 times, most recently from 6cf9ded to 13f9daf Compare April 11, 2026 22:15
@jevolk jevolk force-pushed the dev branch 2 times, most recently from 2b917ee to 44a85e2 Compare April 12, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't right.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants