14 $recent =
new static();
21 $userId = $recent->getContext()->getUserId();
22 $recentEntities = static::getEntities(
$userId, $chatIds);
24 foreach ($recentEntities as
$entity)
28 ->setMessageId((
int)
$entity[
'ITEM_MID'])
29 ->setChatId((
int)
$entity[
'ITEM_CID'])
30 ->setDialogId(self::getDialogId((
int)
$entity[
'ITEM_ID'],
$entity[
'ITEM_TYPE']))
31 ->setUnread((
$entity[
'UNREAD'] ??
'N') ===
'Y')
32 ->setPinned((
$entity[
'PINNED'] ??
'N') ===
'Y')
33 ->setDateUpdate(
$entity[
'DATE_UPDATE'] ??
null)
34 ->setDateLastActivity(
$entity[
'DATE_LAST_ACTIVITY'] ??
null)
35 ->setMarkedId(
$entity[
'MARKED_ID'] ?? 0)
37 $recent[] = $recentItem;
45 $query = RecentTable::query()
58 ->whereIn(
'ITEM_CID', $chatIds)
78 'chatIds' => $chatIds,
79 'messageIds' => $messageIds,
80 'dialogIds' => $dialogIds,
84 protected static function getDialogId(
int $itemId,
string $itemType): string
86 if ($itemType === Chat::IM_TYPE_PRIVATE)
88 return (
string)$itemId;
91 return 'chat' . $itemId;
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
static getEntities(int $userId, array $chatIds)
getPopupData(array $excludedList=[])
static getDialogId(int $itemId, string $itemType)
static getRecentSync(array $chatIds)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)