You can now only chat with friends
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
session_start();
|
session_start();
|
||||||
require_once("../../queries/connect.php");
|
require_once("../../queries/connect.php");
|
||||||
require_once("../../queries/private_message.php");
|
require_once("../../queries/private_message.php");
|
||||||
|
require_once("../../queries/friendship.php");
|
||||||
require_once("../../queries/checkInput.php");
|
require_once("../../queries/checkInput.php");
|
||||||
|
|
||||||
if (!empty(test_input($_POST["destination"])) &&
|
if (!empty(test_input($_POST["destination"])) &&
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ function sendMessage($destination, $content) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getNewChatMessages($lastID, $destination) {
|
function getNewChatMessages($lastID, $destination) {
|
||||||
if (getFriendshipStatus($user2ID) == 1) {
|
if (getFriendshipStatus($destination) == 1) {
|
||||||
$stmt = $GLOBALS["db"]->prepare("
|
$stmt = $GLOBALS["db"]->prepare("
|
||||||
SELECT
|
SELECT
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -74,6 +74,7 @@
|
|||||||
name="content"
|
name="content"
|
||||||
id="newContent"
|
id="newContent"
|
||||||
placeholder="Schrijf een bericht..."
|
placeholder="Schrijf een bericht..."
|
||||||
|
autocomplete="off"
|
||||||
autofocus
|
autofocus
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user