1
0
mirror of https://github.com/nerzhul/ocsms.git synced 2025-06-06 23:46:18 +00:00

Fix wrong message count when checking new messages

Regression was introduced in commit: 580e4415e24f3a7496f930aac9a2386148a56ebf
This commit is contained in:
Loic Blot 2018-09-08 00:04:01 +02:00 committed by Loïc Blot
parent a7a15af70a
commit 5bbb1292c8

View File

@ -235,7 +235,7 @@ class SmsController extends Controller {
foreach ($phoneList as $number => $ts) {
$fmtPN = PhoneNumberFormatter::format($configuredCountry, $number);
$formatedPhoneList[] = $fmtPN;
$formatedPhoneList[$number] = $ts;
if (isset($contactsSrc[$fmtPN])) {
$contacts[$fmtPN] = $contactsSrc[$fmtPN];
if (isset($uidsSrc[$fmtPN])) {
@ -248,7 +248,7 @@ class SmsController extends Controller {
}
}
return new JSONResponse(array("phonelist" => $formatedPhoneList, "contacts" => $contacts, "photos" => $photos, "uids" => $uids));
return new JSONResponse(array("phonelist" => $phoneList, "contacts" => $contacts, "photos" => $photos, "uids" => $uids));
}
/**