Views: 1362
Last Modified: 27.04.2023
Application for opening message context menu inside chat
Embedding code: IM_CONTEXT_MENU
Embedding into the item "Create using" (similar to "Create task” or "Create meeting" based on a message).
Parameters
Parameter |
Required |
Description |
context |
No |
Chat type to embed the app (ALL by default). Supports the multiple selection via ; of the following values:
- USER – all user chats, excluding bots;
- CHAT – all group chats, except lines and crm;
- LINES – chat type lines (open channels);
- CRM – only chats created within CRM;
- ALL – all chats.
|
role |
No |
Application is available for this user role (USER by default). Supports the following values:
- USER – application is available for all users;
- ADMIN – application is available only for Bitrix24 administrators.
|
extranet |
No |
Application is available for extranet users (N by default). Supports the following values:
- N – application is unavailable for extranet users;
- Y – application is available for extranet users.
|
|
This embedding has a current opening context, passed via current chat's dialogId.
const context = BX24.placement.info().options;
Opens application's IFRAME with specified dimensions. The system automatically reduces the size, if it exceeds the permissible value (your application must consider this).
Call example:
CRest::call(
'placement.bind',
[
'PLACEMENT' => 'IM_CONTEXT_MENU',
'HANDLER' => 'https://example.com/apps/immarket/handlers/context_menu.php',
'LANG_ALL' => [
'en' => [
'TITLE' => 'Application for opening message context menu inside chat',
],
],
'OPTIONS' => [
'context' => 'USER;CHAT',
'role' => 'USER',
'extranet' => 'N',
]
]
);