up
This commit is contained in:
@@ -41,6 +41,8 @@ try {
|
||||
lm.content AS last_message,
|
||||
lm.direction AS direction,
|
||||
lm.message_type AS message_type,
|
||||
lm.local_file AS last_local_file,
|
||||
lm.local_thumb AS last_local_thumb,
|
||||
lm.created_at AS last_time,
|
||||
IFNULL(SUM(CASE WHEN c.direction = 'incoming' AND (c.is_read IS NULL OR c.is_read = 0) THEN 1 ELSE 0 END), 0) AS unread_count
|
||||
FROM users u
|
||||
@@ -86,6 +88,8 @@ try {
|
||||
'last_time' => $conv['last_time'] ?? null,
|
||||
'direction' => $conv['direction'] ?? 'incoming',
|
||||
'message_type' => $conv['message_type'] ?? 'text',
|
||||
'last_local_file' => $conv['last_local_file'] ?? null,
|
||||
'last_local_thumb' => $conv['last_local_thumb'] ?? null,
|
||||
'unread_count' => intval($conv['unread_count'] ?? 0),
|
||||
'bot_enabled' => isset($conv['bot_enabled']) ? (bool)$conv['bot_enabled'] : true,
|
||||
'on_hold' => isset($conv['on_hold']) ? (bool)$conv['on_hold'] : false,
|
||||
|
||||
Reference in New Issue
Block a user