1
0
mirror of https://github.com/nerzhul/ocsms.git synced 2025-06-07 16:06:15 +00:00

last read date use the reprocessed phone number, not the raw phone number

This commit is contained in:
Loic Blot 2016-09-22 23:07:10 +02:00
parent 010acd7adc
commit 7ca7154a1e

View File

@ -235,7 +235,7 @@ class SmsMapper extends Mapper {
$phoneList = array();
while ($row = $result->fetchRow()) {
$phoneNumber = preg_replace("#[ ]#", "", $row["sms_address"]);
if ($this->getLastReadDateForPhoneNumber($userId, $row["sms_address"]) < $lastDate) {
if ($this->getLastReadDateForPhoneNumber($userId, $phoneNumber) < $lastDate) {
if (!array_key_exists($phoneNumber, $phoneList)) {
$phoneList[$phoneNumber] = $row["ct"];
}