<commit_before><div ng-controller="RoomController" data-ng-init="onInit()" class="room" style="height: 100%;">

    <script type="text/ng-template" id="eventInfoTemplate.html">
        <div class="modal-body">
            <pre> {{event_selected | json}} </pre>
        </div>
        <div class="modal-footer">
            <button ng-click="redact()" type="button" class="btn btn-danger" 
             ng-disabled="!room.current_room.state.state_events['m.room.ops_levels'].content.redact_level || !pow(room_id, state.user_id) || pow(room_id, state.user_id) < room.current_room.state.state_events['m.room.ops_levels'].content.redact_level"
             title="Delete this event on all home servers. This cannot be undone.">
                Redact
            </button>        
        </div>
    </script>

    <script type="text/ng-template" id="roomInfoTemplate.html">
        <div class="modal-body">
            <table class="room-info">
            <tr ng-repeat="(key, event) in roomInfo.stateEvents" class="room-info-event">
                <td class="room-info-event-meta" width="30%">
                    <span class="monospace">{{ event.type }}</span>
                    <span ng-show="event.state_key" class="monospace"> ({{event.state_key}})</span>
                    <br/>
                    {{ (event.origin_server_ts) | date:'MMM d HH:mm' }}
                    <br/>
                    Set by: <span class="monospace">{{ event.user_id }}</span>
                    <br/>
                    <span ng-show="event.required_power_level >= 0">Required power level: {{event.required_power_level}}<br/></span>
                    <button ng-click="submit(event)" type="button" class="btn btn-success" ng-disabled="!event.content">
                        Submit
                    </button>
                </td>
                <td class="room-info-event-content" width="70%">
                    <textarea class="room-info-textarea-content" msd-elastic ng-model="event.content" asjson></textarea> 
                </td>
            </tr><commit_msg>Fix broken redact enable logic.<commit_after><div ng-controller="RoomController" data-ng-init="onInit()" class="room" style="height: 100%;">

    <script type="text/ng-template" id="eventInfoTemplate.html">
        <div class="modal-body">
            <pre> {{event_selected | json}} </pre>
        </div>
        <div class="modal-footer">
            <button ng-click="redact()" type="button" class="btn btn-danger" 
             ng-disabled="!room.current_room_state.state('m.room.ops_levels').content.redact_level || !pow(room_id, state.user_id) || pow(room_id, state.user_id) < room.current_room_state.state('m.room.ops_levels').content.redact_level"
             title="Delete this event on all home servers. This cannot be undone.">
                Redact
            </button>        
        </div>
    </script>

    <script type="text/ng-template" id="roomInfoTemplate.html">
        <div class="modal-body">
            <table class="room-info">
            <tr ng-repeat="(key, event) in roomInfo.stateEvents" class="room-info-event">
                <td class="room-info-event-meta" width="30%">
                    <span class="monospace">{{ event.type }}</span>
                    <span ng-show="event.state_key" class="monospace"> ({{event.state_key}})</span>
                    <br/>
                    {{ (event.origin_server_ts) | date:'MMM d HH:mm' }}
                    <br/>
                    Set by: <span class="monospace">{{ event.user_id }}</span>
                    <br/>
                    <span ng-show="event.required_power_level >= 0">Required power level: {{event.required_power_level}}<br/></span>
                    <button ng-click="submit(event)" type="button" class="btn btn-success" ng-disabled="!event.content">
                        Submit
                    </button>
                </td>
                <td class="room-info-event-content" width="70%">
                    <textarea class="room-info-textarea-content" msd-elastic ng-model="event.content" asjson></textarea> 
                </td>
            </tr>
{'fraction_non_alphanumeric': 0.16029980657640233, 'fraction_numerical': 0.0038684719535783366, 'mean_word_length': 2.0329912023460412, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 77, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4978092', 'n_tokens_mistral': 1245, 'n_tokens_neox': 1162, 'n_words': 217}