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

Add photo into update and fix HTML generator

This commit is contained in:
Loic Blot
2015-01-05 19:54:50 +00:00
parent 6fa1bfe17f
commit 19bd6adcca
2 changed files with 10 additions and 3 deletions
+4 -1
View File
@@ -189,7 +189,9 @@ class SmsController extends Controller {
public function checkNewMessages($lastDate) {
$phoneList = $this->smsMapper->getNewMessagesCountForAllPhonesNumbers($this->userId, $lastDate);
$contactsSrc = $this->app->getContacts();
$photosSrc = $this->app->getContactPhotos();
$contacts = array();
$photos = array();
$countPhone = count($phoneList);
foreach ($phoneList as $number => $ts) {
@@ -198,10 +200,11 @@ class SmsController extends Controller {
$fmtPN2 = preg_replace("#\/#","", $fmtPN);
$contacts[$fmtPN] = $contactsSrc[$fmtPN];
$contacts[$fmtPN2] = $contactsSrc[$fmtPN];
$photos[$fmtPN] = $photosSrc[$fmtPN];
}
}
return new JSONResponse(array("phonelist" => $phoneList, "contacts" => $contacts));
return new JSONResponse(array("phonelist" => $phoneList, "contacts" => $contacts, "photos" => $photos));
}
/**