Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RoomDirectory to join by alias whenever possible. #1615

Merged
merged 3 commits into from
Jun 10, 2016

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Jun 9, 2016

This doesn't really attempt to unravel the different code paths that joining a room can take (apart from commenting it a little). It just fixes this bug for now.

@dbkr
Copy link
Member Author

dbkr commented Jun 9, 2016

wait, there's a better way to do this

This still doesn't actually cause the room to be joined by alias though, so still need to fix that
@dbkr
Copy link
Member Author

dbkr commented Jun 9, 2016

ok, all yours

@richvdh
Copy link
Member

richvdh commented Jun 9, 2016

ugh. everything is awful. but ok.

Are you sure this fixes #1532? I don't think the RoomDirectory component is involved in that.

@richvdh
Copy link
Member

richvdh commented Jun 9, 2016

Not merging this right now because I don't want to babysit its deployment to /develop

@richvdh richvdh assigned dbkr and unassigned richvdh Jun 9, 2016
@dbkr
Copy link
Member Author

dbkr commented Jun 10, 2016

Ah, I made this less awful... and then somehow managed to not actually push the commit. Now requires matrix-org/matrix-react-sdk#304 which fixes #1532. ptal :)

@dbkr dbkr assigned richvdh and unassigned dbkr Jun 10, 2016
};
if (roomAlias) {
payload.action = 'view_room_alias';
payload.room_alias = roomAlias;
Copy link
Member

Choose a reason for hiding this comment

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

Is it a mistake to throw away the room id if we know it? I'm worried about cases where the directory somehow gets out of sync with the room_aliases in the rooms, so you actually end up joining a different room to the one you chose in the directory.

Perhaps at least a comment to this effect?

Copy link
Member

Choose a reason for hiding this comment

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

Actually, shouldn't this logic of 'prefer the alias if we have it' be in MatrixChat?

@richvdh
Copy link
Member

richvdh commented Jun 10, 2016

Certainly an improvement. Looks good modulo my comment.

@dbkr
Copy link
Member Author

dbkr commented Jun 10, 2016

ptal

@richvdh
Copy link
Member

richvdh commented Jun 10, 2016

lgtm

@richvdh richvdh merged commit a5986ad into develop Jun 10, 2016
@t3chguy t3chguy deleted the dbkr/directory_join_by_alias branch May 12, 2022 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants