1
0
mirror of https://github.com/nextcloud/ocsms.git synced 2026-08-11 16:32:55 +00:00

prepare a function to get all messages for a conversation

This commit is contained in:
Loïc Blot (@U-Exp)
2014-09-16 22:31:50 +02:00
parent 7e72af1ccb
commit cc13e01fe9
4 changed files with 31 additions and 1 deletions
+10
View File
@@ -72,6 +72,16 @@ class SmsController extends Controller {
return new JSONResponse(array("phonelist" => $phoneList));
}
/**
* @NoAdminRequired
* @NoCSRFRequired
*/
public function getConversation ($phoneNumber) {
$messages = $this->smsMapper->getAllMessagesForPhoneNumber($this->userId, $phoneNumber);
// @ TODO: filter correctly
return new JSONResponse(array("conversation" => $messages));
}
/**
* @NoAdminRequired
*/