mirror of
https://github.com/nextcloud/ocsms.git
synced 2026-08-11 16:32:55 +00:00
Conversation header CSS fix & unicity fixes for unread messages & peerlist last messages
Note: for unread message count we need one more fix
This commit is contained in:
+6
-3
@@ -211,7 +211,7 @@ class SmsMapper extends Mapper {
|
||||
$phoneList = array();
|
||||
while ($row = $result->fetchRow()) {
|
||||
$phoneNumber = preg_replace("#[ ]#", "", $row["sms_address"]);
|
||||
if (!in_array($phoneNumber, $phoneList)) {
|
||||
if (!array_key_exists($phoneNumber, $phoneList)) {
|
||||
$phoneList[$phoneNumber] = $row["mx"];
|
||||
}
|
||||
// Maybe duplicate due to spaces in database
|
||||
@@ -235,10 +235,13 @@ class SmsMapper extends Mapper {
|
||||
$phoneList = array();
|
||||
while ($row = $result->fetchRow()) {
|
||||
$phoneNumber = preg_replace("#[ ]#", "", $row["sms_address"]);
|
||||
if (!in_array($phoneNumber, $phoneList)) {
|
||||
if ($this->getLastReadDateForPhoneNumber($userId, $phoneNumber) < $lastDate) {
|
||||
if ($this->getLastReadDateForPhoneNumber($userId, $row["sms_address"]) < $lastDate) {
|
||||
if (!array_key_exists($phoneNumber, $phoneList)) {
|
||||
$phoneList[$phoneNumber] = $row["ct"];
|
||||
}
|
||||
else {
|
||||
$phoneList[$phoneNumber] += $row["ct"];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $phoneList;
|
||||
|
||||
Reference in New Issue
Block a user