mirror of
https://github.com/nextcloud/ocsms.git
synced 2026-08-11 16:32:55 +00:00
Added ajaxCall to get all phone Numbers. Also cleanup templates
This commit is contained in:
@@ -38,12 +38,10 @@ class SmsController extends Controller {
|
||||
$mboxes = array(
|
||||
'PNLConversations' => array(
|
||||
'label' => 'Conversations',
|
||||
'phoneNumbers' => $this->smsMapper->getAllPeersPhoneNumbers($this->userId),
|
||||
'url' => \OCP\Util::linkToAbsolute('index.php', 'apps/ocsms/', array('feed' => 'conversations'))
|
||||
),
|
||||
'PNLDrafts' => array(
|
||||
'label' => 'Drafts',
|
||||
'phoneNumbers' => array(),
|
||||
'url' => \OCP\Util::linkToAbsolute('index.php', 'apps/ocsms/', array('feed' => 'drafts'))
|
||||
)
|
||||
);
|
||||
@@ -63,6 +61,16 @@ class SmsController extends Controller {
|
||||
return new JSONResponse(array("smslist" => $smsList));
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*/
|
||||
public function retrieveAllPeers () {
|
||||
$phoneList = $this->smsMapper->getAllPeersPhoneNumbers($this->userId);
|
||||
// @ TODO: filter correctly
|
||||
return new JSONResponse(array("phonelist" => $phoneList));
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user