5use Bitrix\Im\Model\MessageUnreadTable;
6use Bitrix\Main\Config\Option;
7use Bitrix\Main\Type\DateTime;
24 $lastSend = (int)Option::get(static::MODULE_ID, self::LAST_SEND_MESSAGE, 0);
35 $lastSend = (int)Option::get(static::MODULE_ID, self::LAST_SEND_NOTIFICATION, 0);
42 $sendDelayInSeconds = (int)Option::get(static::MODULE_ID, self::SEND_DELAY_OPTION_NAME, self::DEFAULT_SEND_DELAY);
43 $sendDelayInSeconds = abs($sendDelayInSeconds);
44 $readDeadline = (
new DateTime())->add(
"-{$sendDelayInSeconds} seconds");
45 $query = MessageUnreadTable::query()
46 ->setSelect([
'MESSAGE_ID'])
47 ->where(
'MESSAGE_ID',
'>', $lastSend)
48 ->where(
'CHAT_TYPE',
$type)
49 ->where(
'DATE_CREATE',
'<', $readDeadline)
const LAST_SEND_NOTIFICATION
getNotificationIdsToSend(?int $limit=null)
const SEND_DELAY_OPTION_NAME
getMessageIdsToSendByType(string $type, int $lastSend, ?int $limit=null)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)