fetch("send_message.php", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ recipient: selectedUser, message })
})
.then(response => {
    console.log("Raw Response:", response); // Debug respons
    return response.json();
})
.then(data => {
    console.log("Parsed Data:", data); // Debug data yang diterima
})
.catch(error => console.error("Error sending message:", error));