@using LibMatrix.Extensions @using ArcaneLibs.Extensions @using LibMatrix.EventTypes.Spec.State @inherits BaseTimelineItem @if (roomMemberData is not null) { @switch (roomMemberData.Membership) { case "ban": @Event.StateKey was banned break; case "invite": @Event.StateKey was invited break; case "join" when Event.ReplacesState is not null: @Event.StateKey changed their display name to @(roomMemberData.DisplayName ?? Event.Sender) break; case "join": joined break; case "leave": @Event.StateKey left break; case "knock": @Event.StateKey knocked break; default: @Event.StateKey has an unknown state:
                @Event.ToJson()
            
break; } } else {
Unknown membership event for @Event.StateKey
            @Event.ToJson()
        
} @code { private RoomMemberEventContent? roomMemberData => Event.TypedContent as RoomMemberEventContent; }