1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
CommentMentionService.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Im\V2\Message\Send\Mention
;
4
5
use
Bitrix\Im\V2\Chat
;
6
use
Bitrix\Im\V2\Message
;
7
use
Bitrix\Im\V2\Message\Send\MentionService
;
8
9
class
CommentMentionService
extends
MentionService
10
{
11
protected
function
getChat
(
Message
$message
):
Chat
12
{
13
$chat =
$message
->getChat();
14
15
if
($chat instanceof
Chat
\
CommentChat
)
16
{
17
$chat = $chat->getParentChat();
18
}
19
20
return
$chat;
21
}
22
23
protected
function
needToSendPull
(): bool
24
{
25
return
false
;
26
}
27
28
protected
function
getNotifyTextCode
(
string
$userGender): string
29
{
30
return
"IM_MESSAGE_MENTION_COMMENT_{$userGender}"
;
31
}
32
33
protected
function
getTitleWithContext
(
string
$title
,
Message
$message
): string
34
{
35
$chatId =
$message
->getChat()->getParentChatId();
36
$messageId
=
$message
->getChat()->getParentMessageId();
37
38
return
"[CONTEXT=chat{$chatId}/{$messageId}]{$title}[/CONTEXT]"
;
39
}
40
41
protected
function
shouldSendMentionNotification
(
Chat
$chat,
int
$userId
): bool
42
{
43
return
true
;
44
}
45
}
$messageId
if(! $messageFields||!isset($messageFields['message_id'])||!isset($messageFields['status'])||!CModule::IncludeModule("messageservice")) $messageId
Определения
callback_ismscenter.php:26
$userId
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения
check_mail.php:18
Bitrix\Im\V2\Chat\CommentChat
Определения
CommentChat.php:27
Bitrix\Im\V2\Message\Send\Mention\CommentMentionService
Определения
CommentMentionService.php:10
Bitrix\Im\V2\Message\Send\Mention\CommentMentionService\getChat
getChat(Message $message)
Определения
CommentMentionService.php:11
Bitrix\Im\V2\Message\Send\Mention\CommentMentionService\needToSendPull
needToSendPull()
Определения
CommentMentionService.php:23
Bitrix\Im\V2\Message\Send\Mention\CommentMentionService\getNotifyTextCode
getNotifyTextCode(string $userGender)
Определения
CommentMentionService.php:28
Bitrix\Im\V2\Message\Send\Mention\CommentMentionService\getTitleWithContext
getTitleWithContext(string $title, Message $message)
Определения
CommentMentionService.php:33
Bitrix\Im\V2\Message\Send\Mention\CommentMentionService\shouldSendMentionNotification
shouldSendMentionNotification(Chat $chat, int $userId)
Определения
CommentMentionService.php:41
Bitrix\Im\V2\Message\Send\MentionService
Определения
MentionService.php:16
Bitrix\Im\Message
Определения
Uuid.php:3
Bitrix\Im\V2\Chat
Bitrix\Im\V2\Message\Send\Mention
Определения
CommentMentionService.php:3
Bitrix\Im\V2\Message
Определения
AdditionalMessagePopupItem.php:3
$message
$message
Определения
payment.php:8
$title
$title
Определения
pdf.php:123
bitrix
modules
im
lib
V2
Message
Send
Mention
CommentMentionService.php
Создано системой
1.14.0