E
E
Emil Chapchakchi2021-05-04 23:51:58
Bitrix24
Emil Chapchakchi, 2021-05-04 23:51:58

How to put notifications in Bitrix24?

I send messages to a group chat with the following code:

\Bitrix\Main\Loader::includeModule('im');
$message = Array
(
    ["FROM_USER_ID"] => $from_user_id
    ["TO_CHAT_ID"] => $to_chat_id
    ["MESSAGE"] => $mess
)
$CIMChat = new CIMChat();
$CIMChat->AddMessage($message);


And I'm waiting for this notification:
6091b3542420c589762850.png

The problem is that this notification comes only after the page is reloaded or after 20 minutes of waiting
. Can you tell me how to make the notifications come immediately? Something to configure or add some parameter to the code? I did not find any clear documentation covering this issue.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
fidos90, 2021-10-19
@emilchap

Probably not relevant anymore, but you can just include epilog_after.php at the bottom of the script and everything will work as it should.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question