mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-12-28 06:28:58 +00:00
Returns conversations messages
This commit is contained in:
parent
9e85b25c1a
commit
ce92bb04b2
@ -298,14 +298,20 @@ class accountController {
|
||||
foreach($data["movies"] as $num => $movie)
|
||||
$data["movies"][$num] = MoviesController::MovieToAPI($movie);
|
||||
|
||||
//Conversations messages
|
||||
foreach($data["conversation_messages"] as $num => $message)
|
||||
$data["conversation_messages"][$num] = ConversationsController::ConvMessageToAPI($message);
|
||||
//All conversations messages from user
|
||||
foreach($data["all_conversation_messages"] as $num => $message)
|
||||
$data["all_conversation_messages"][$num] = ConversationsController::ConvMessageToAPI($message);
|
||||
|
||||
//Conversations list
|
||||
foreach($data["conversations_list"] as $num => $conversation)
|
||||
$data["conversations_list"][$num] = ConversationsController::ConvInfoToAPI($conversation);
|
||||
|
||||
//Conversation messages
|
||||
foreach($data["conversations_messages"] as $convID=>$messages){
|
||||
foreach($messages as $num=>$message)
|
||||
$data["conversations_messages"][$convID][$num] = ConversationsController::ConvMessageToAPI($message);
|
||||
}
|
||||
|
||||
//Friends list
|
||||
foreach($data["friends_list"] as $num => $friend)
|
||||
$data["friends_list"][$num] = friendsController::parseFriendAPI($friend);
|
||||
|
@ -393,11 +393,20 @@ class AccountComponent {
|
||||
$data["movies"] = components()->movies->get_list($userID);
|
||||
|
||||
//Conversation messages
|
||||
$data["conversation_messages"] = components()->conversations->getAllUserMessages($userID);
|
||||
$data["all_conversation_messages"] = components()->conversations->getAllUserMessages($userID);
|
||||
|
||||
//Conversations list
|
||||
$data["conversations_list"] = components()->conversations->getList($userID);
|
||||
|
||||
//Conversation messages
|
||||
$data["conversations_messages"] = array();
|
||||
foreach($data["conversations_list"] as $conversation)
|
||||
|
||||
//Get all the messages of the conversation
|
||||
$data["conversations_messages"][$conversation->get_ID()] =
|
||||
components()->conversations->getAllMessages($conversation->get_ID());
|
||||
|
||||
|
||||
//Friend list
|
||||
$data["friends_list"] = components()->friends->getList($userID);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user