mcpField
B
bitrix24-im

bitrix24-im

github.com/bxmaximumDevelopment4780 installsUpdated 2w ago
Repository

About bitrix24-im

A reference skill for server-side Bitrix24 messenger development on on-premise portals. It covers messages, chats, notifications, bots, and implementation constraints for user checks and background work.

Key features

  1. 01Sending messages and managing chats
  2. 02Notification types, tags, and deletion
  3. 03Chat bots, slash commands, and open lines
  4. 04User identity and send-rights checks
  5. 05Background processing after sending

Use cases

  1. 01Implementing chat messages and membership changes
  2. 02Creating deduplicated, removable notifications
  3. 03Building module-based chat bots and commands

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/bxmaximum/bitrix-framework-skills --skill bitrix24-im

After installing, type/bitrix24-imin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

rules/
bots.md
messages-chats.md
notifications.md
pitfalls.md

Details

From the project README

Bitrix24 messenger (server side)

Scope: Bitrix24 on-premise · Verified: im 26.900.0, imbot 26.400.0, main 26.800.0

TaskRead
Send messages, system messages, attach/keyboard, create chats, members, im eventsrules/messages-chats.md
Notifications: types, tags, delete, confirm buttons, user settings schemarules/notifications.md
Chat bots and slash commands from a module; REST imbot.v2; open linesrules/bots.md
Breaking changes im 26.700–26.900, REST ↔ PHP mappingrules/pitfalls.md

Invariants

  • Loader::includeModule('im') before any messenger class (Bitrix\Im\V2\Chat, CIMChat, CIMNotify …).
  • Pass explicit user ids (FROM_USER_ID, AUTHOR_ID, TO_USER_ID, context user). Agents and CLI have no $USER.
  • Bitrix\Im\V2\Chat::sendMessage() does not check the author's rights: call canDo(Action::Send) first, or use CIMChat::AddMessage(), which checks unless SYSTEM/SKIP_USER_CHECK is Y.
  • After-send work (push, counters, OnAfterMessagesAdd, bots) runs as a background job after the response. In CLI scripts call $result->getPromise()?->wait(); the CIM* wrappers wait by default.
  • Notifications: CIMNotify::Add() only. NotifyChat::sendMessage() is a stub in im 26.900.
  • Give every notification a NOTIFY_TAG: it dedupes (same tag replaces the older one for the user) and allows deletion.
  • Custom chats bound to your entity: ENTITY_TYPE in your own namespace + addUniqueChat(); never write b_im_* tables.

Comments

Markdown supported