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 crash when opening rooms where the current user doesn't have perm… #6165

Merged
merged 1 commit into from
May 18, 2022

Conversation

stefanceriu
Copy link
Member

…ission to post messages.

@stefanceriu stefanceriu force-pushed the stefan/disabled-room-input-toolbar-fix branch from be722ae to e17630f Compare May 17, 2022 12:51
@stefanceriu stefanceriu requested review from a team, phloux and MaximeEvrard42 and removed request for a team May 17, 2022 12:51
@github-actions
Copy link

📱 Scan the QR code below to install the build for this PR.
🔒 This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.

QR code

If you can't scan the QR code you can install the build via this link: https://i.diawi.com/tAVwR7

Copy link
Contributor

@aringenbach aringenbach left a comment

Choose a reason for hiding this comment

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

LGTM but I wonder if we should rather use
inputToolbarViewAsRoomInputToolbarView
everywhere on RoomViewController.

I did not try to reproduce, but it seems to me that this kind of cast might succeed on the disabled version, hence the crash :
RoomInputToolbarView *inputToolbar = (RoomInputToolbarView *)self.inputToolbarView;

@stefanceriu
Copy link
Member Author

Well the code around this whole thing, while an absolute mess, does usually check using isKindOfClass:RoomInputToolbarView. I wouldn't spend more time on this than absolutely necessary, nothing good can come out of it without a full rewrite ¯_(ツ)_/¯

@stefanceriu stefanceriu merged commit 792b425 into develop May 18, 2022
@stefanceriu stefanceriu deleted the stefan/disabled-room-input-toolbar-fix branch May 18, 2022 08:58
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.

3 participants