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

Only use the sender when rendering the room creation event. #7640

Merged
merged 1 commit into from
Aug 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions Riot/Modules/MatrixKit/Utils/EventFormatter/MXKEventFormatter.m
Original file line number Diff line number Diff line change
Expand Up @@ -830,15 +830,10 @@ - (NSAttributedString *)attributedStringFromEvent:(MXEvent*)event
}
case MXEventTypeRoomCreate:
{
NSString *creatorId;
MXJSONModelSetString(creatorId, event.content[@"creator"]);

if (!creatorId)
{
// Room version 11 removes `creator` in favour of `sender`.
// https://github.com/matrix-org/matrix-spec-proposals/pull/2175
creatorId = event.sender;
}
// Room version 11 removes `creator` in favour of `sender`.
// https://github.com/matrix-org/matrix-spec-proposals/pull/2175
// Just use the sender as it is possible to create a v11 room and spoof the `creator`.
NSString *creatorId = event.sender;

if ([creatorId isEqualToString:mxSession.myUserId])
{
Expand Down
Loading