You can now only chat with friends

This commit is contained in:
Lars van Hijfte
2017-01-26 21:50:47 +01:00
parent 70b7734e8b
commit 032e25b044
3 changed files with 3 additions and 1 deletions

View File

@@ -3,6 +3,7 @@
session_start();
require_once("../../queries/connect.php");
require_once("../../queries/private_message.php");
require_once("../../queries/friendship.php");
require_once("../../queries/checkInput.php");
if (!empty(test_input($_POST["destination"])) &&

View File

@@ -58,7 +58,7 @@ function sendMessage($destination, $content) {
}
function getNewChatMessages($lastID, $destination) {
if (getFriendshipStatus($user2ID) == 1) {
if (getFriendshipStatus($destination) == 1) {
$stmt = $GLOBALS["db"]->prepare("
SELECT
*

View File

@@ -74,6 +74,7 @@
name="content"
id="newContent"
placeholder="Schrijf een bericht..."
autocomplete="off"
autofocus
required
/>