Add IM\Message service for im.message.* support#440
Merged
Conversation
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add a Core rules block to the "Creating a Pull Request" section: - Agent must auto-create the PR via mcp__github__create_pull_request; never forward the pull/new URL as a manual-action prompt. - PR base branch is fixed by API version: v3-dev for v3, dev for v1; never main. - PR body always composed from .github/PULL_REQUEST_TEMPLATE.md read fresh from disk, not a memorised layout. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Implements six REST methods under the im scope: - add: im.message.add -> AddedItemResult - update: im.message.update -> UpdatedItemResult - delete: im.message.delete -> DeletedItemResult - like: im.message.like (LikeAction enum) -> UpdatedItemResult - share: im.message.share (ShareType enum) -> UpdatedItemResult - command: im.message.command -> UpdatedItemResult Wires IMServiceBuilder::message() cached accessor, adds unit and integration test suites (integration_tests_im_message), Makefile target test-integration-im-message, and CHANGELOG entry under 3.2.0 UNRELEASED. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…om/bitrix24/b24phpsdk into feature/426-add-im-message-service # Conflicts: # tests/Unit/Services/IM/IMServiceBuilderTest.php
# Conflicts: # CHANGELOG.md # phpunit.xml.dist # src/Services/IM/IMServiceBuilder.php # tests/Unit/Services/IM/IMServiceBuilderTest.php
…p chat Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…chments Adds coverage for minimal USER block, avatar and link, and entity variants (user, bot, chat, and network). Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…ttachments Adds tests for plain text and BBCode variants, covering documented formats like USER, CHAT, URL, and formatting tags (B, U, I, S). Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…chments Adds tests for various LINK block configurations, including minimal payload, preview with description, HTML descriptions, and entity variants (user, chat, and network). Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…achments Adds tests for IMAGE block configurations, including minimal payload, images with preview and dimensions, and multiple images. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…chments Adds tests for various GRID block configurations, including BLOCK, LINE, ROW, and TABLE displays, as well as settings with BBCode values and entity links. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…tachments Adds tests for ATTACH block configurations, including full form with metadata and blocks, as well as a short form without a metadata wrapper. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…chments Adds tests for various FILE block configurations, including minimal link-only payload, full payload with name and size, and multiple file attachments. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
… attachments Adds tests for various DELIMITER block configurations, including default settings, size-only blocks, and blocks with size and color options. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Adds tests for basic and advanced BBCode formatting payloads, including tags for styling, user mentions, hyperlinks, quotes, code blocks, and timestamps. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…NU payloads Adds tests for KEYBOARD payloads with buttons for links, actions, and newlines, as well as MENU payloads with link and action items. Includes validation of successful message creation. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…rvice Introduces a fluent API for constructing ATTACH payloads with dedicated typed objects (MESSAGE, LINK, USER, IMAGE, FILE, DELIMITER, GRID). Includes backward compatibility with legacy array-based payloads and enriches developer experience with clear, structured API design. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Removes outdated unit tests for the `Message` service in the IM message module, aligning with recent updates and changes in testing strategy. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…ted tests Introduces `RawAttach` as an object-based escape hatch for unsupported or vendor-extended ATTACH payloads in the IM message service. Includes unit tests for `RawAttach` and updated integration tests validating its usage with `Message`. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements a new service
Bitrix24\SDK\Services\IM\Message\Service\Messagewrapping six
im.message.*REST API methods under theimscope:addim.message.addAddedItemResultupdateim.message.updateUpdatedItemResultdeleteim.message.deleteDeletedItemResultlikeim.message.like(withLikeActionenum:auto/plus/minus)UpdatedItemResultshareim.message.share(withShareTypeenum:CHAT/TASK/POST/CALEND)UpdatedItemResultcommandim.message.commandUpdatedItemResultThe service is exposed via a new cached accessor
IMServiceBuilder::message().Two typed backed-string enums (
LikeAction,ShareType) sit next to the serviceso IDE autocomplete and static analysis can enforce valid values at call sites.
Usage
Test plan
Closes #426
🤖 Generated with Claude Code