<commit_before><?php

		$rs = my_query('SELECT * FROM attendance WHERE raid_id='.$data['id'].' AND user_id='.$update['callback_query']['from']['id'].'');
		$answer = $rs->fetch_assoc();
		debug_log($answer);
		
		if (!$answer) {
			$query = 'SELECT * FROM users WHERE user_id='.$update['callback_query']['from']['id'];
			$rs = my_query($query);
			$row = $rs->fetch_assoc();

			my_query('INSERT INTO attendance SET raid_id='.$data['id'].', user_id='.$update['callback_query']['from']['id'].', arrived=1, team="'.$row['team'].'"');
		} else {
			my_query('UPDATE attendance SET arrived=1,raid_done=0,cancel=0 WHERE raid_id='.$data['id'].' AND user_id='.$update['callback_query']['from']['id'].'');
		}
		
		send_response_vote($update, $data);
		
<commit_msg>Update arrival time<commit_after><?php

		$rs = my_query('SELECT * FROM attendance WHERE raid_id='.$data['id'].' AND user_id='.$update['callback_query']['from']['id'].'');
		$answer = $rs->fetch_assoc();
		debug_log($answer);
		
		if (!$answer) {
			$query = 'SELECT * FROM users WHERE user_id='.$update['callback_query']['from']['id'];
			$rs = my_query($query);
			$row = $rs->fetch_assoc();

			my_query('INSERT INTO attendance SET raid_id='.$data['id'].', user_id='.$update['callback_query']['from']['id'].', arrived=1, team="'.$row['team'].'", attend_time=NOW()');
		} else {
			my_query('UPDATE attendance SET arrived=1,raid_done=0,cancel=0,attend_time=NOW() WHERE raid_id='.$data['id'].' AND user_id='.$update['callback_query']['from']['id'].'');
		}
		
		send_response_vote($update, $data);
		

{'fraction_non_alphanumeric': 0.2472773862908392, 'fraction_numerical': 0.005124919923126201, 'mean_word_length': 5.911504424778761, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '1844662', 'n_tokens_mistral': 580, 'n_tokens_neox': 527, 'n_words': 89}