You can now only chat with friends
This commit is contained in:
@@ -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"])) &&
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
name="content"
|
||||
id="newContent"
|
||||
placeholder="Schrijf een bericht..."
|
||||
autocomplete="off"
|
||||
autofocus
|
||||
required
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user