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:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user