Can get all the messages of a conversation.

This commit is contained in:
Pierre 2018-05-27 11:36:27 +02:00
parent b11bd0740f
commit 9e85b25c1a

View File

@ -628,6 +628,27 @@ class Conversations {
}
/**
* Get all the messages of a conversation
*
* @param int $conversationID The ID of the target conversation
* @return array The list of messages
*/
public function getAllMessages(int $conversationID) : array {
//Define conditions
$conditions = "WHERE ID_".$this->conversationsListTable." = ? ORDER BY ID";
$condVals = array(
$conversationID
);
//Perform request
$messages = $this->getMessages($conditions, $condVals);
//Return messages
return $messages;
}
/**
* Check whether a conversation exists or not
*