false, 'ERROR' => 'method_not_allowed'], 405); } $body = readJsonBody(); $messageId = (int) ($body['MessageID'] ?? 0); $agentAddress = trim($body['AgentAddress'] ?? ''); $emojiName = trim($body['EmojiName'] ?? ''); if ($messageId <= 0) jsonResponse(['OK' => false, 'ERROR' => 'message_id_required']); if ($agentAddress === '') jsonResponse(['OK' => false, 'ERROR' => 'agent_address_required']); if ($emojiName === '') jsonResponse(['OK' => false, 'ERROR' => 'emoji_name_required']); $stmt = queryTimed( "DELETE FROM Hub_Reactions WHERE MessageID = ? AND AgentAddress = ? AND EmojiName = ?", [$messageId, $agentAddress, $emojiName] ); if ($stmt->rowCount() === 0) { jsonResponse(['OK' => false, 'ERROR' => 'reaction_not_found']); } jsonResponse(['OK' => true]);