Skip to content

Add IM\ChatUser service for im.chat.user.* support #424

@mesilov

Description

@mesilov

Problem

The Bitrix24 REST API methods im.chat.user.* (chat participant management) are not yet supported by the SDK. See https://apidocs.bitrix24.com/api-reference/chats/index.html.

Proposed solution

Add a new service src/Services/IM/Chat/Service/ChatUser.php that wraps the following REST methods, following patterns in other src/Services/<Scope>/ folders. Scope: im.

Methods to implement

  • im.chat.user.add — add participants to a chat
  • im.chat.user.delete — remove a participant from a chat
  • im.chat.user.list — list participant ids of a chat

Acceptance criteria

  • Bitrix24\SDK\Services\IM\Chat\Service\ChatUser implements each method with correct parameter mapping and #[ApiEndpointMetadata] / #[ApiServiceMetadata(new Scope(['im']))] attributes
  • IMServiceBuilder::chatUser() exposes the new service
  • Unit tests in tests/Unit/Services/IM/Chat/Service/ChatUserTest.php pass (make test-unit)
  • Integration tests in tests/Integration/Services/IM/Chat/Service/ChatUserTest.php pass
  • make test-integration-im-chat-user target added to Makefile and a suite added to phpunit.xml.dist
  • CHANGELOG.md entry under ## 3.2.0 – UNRELEASED### Added with link to this issue

Part of #422.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions