Skip to content

Add ChatClient endpoints for user groups, roles, and chat preferences#6493

Open
gpunto wants to merge 5 commits into
developfrom
pr2-enhanced-mentions-endpoints
Open

Add ChatClient endpoints for user groups, roles, and chat preferences#6493
gpunto wants to merge 5 commits into
developfrom
pr2-enhanced-mentions-endpoints

Conversation

@gpunto

@gpunto gpunto commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Goal

Add the ChatClient endpoints the enhanced-mentions UI needs: user-group CRUD/search, role search, and granular chat-preference toggles. No UI yet.

This is PR 2 in the enhanced-mentions series.

Part of AND-1175

Implementation

  • User groups: createUserGroup, updateUserGroup, deleteUserGroup, getUserGroup, queryUserGroups, searchUserGroups, addUserGroupMembers, removeUserGroupMembers. New Retrofit interface UserGroupApi with matching request/response DTOs.
  • Roles: searchRoles + new Role model and DownstreamRoleDto. New Retrofit interface RoleApi.
  • Chat preferences: setUserChatPreferences(prefs) and setChannelChatPreferences(cid, prefs). New ChatPreferences model with a ChatPreferenceToggle per mention type. PushPreference gains a chatPreferences field so existing push-preference reads surface the new toggles.
  • ChatApi / MoshiChatApi wire the new endpoints; ChatModule registers RoleApi and UserGroupApi.

Testing

  • MoshiChatApiTest covers every new endpoint: request shape, response mapping, and error paths.
  • API dump regenerated for stream-chat-android-client and stream-chat-android-core.

Summary by CodeRabbit

  • New Features
    • Comprehensive user group management: create, query/search, retrieve, update, delete, and manage group members
    • Role search to discover available roles
    • Granular per-user and per-channel chat preferences for category-specific push notification controls (mention/thread defaults)

@gpunto gpunto added the pr:new-feature New feature label Jun 9, 2026
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

PR checklist ✅

All required conditions are satisfied:

  • Title length is OK (or ignored by label).
  • At least one pr: label exists.
  • Sections ### Goal, ### Implementation, and ### Testing are filled, or the PR is bot-authored.
  • An issue is linked (Linear ticket or GitHub issue), or the PR is bot-authored.

🎉 Great job! This PR is ready for review.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 5.88 MB 5.90 MB 0.02 MB 🟢
stream-chat-android-ui-components 11.11 MB 11.13 MB 0.03 MB 🟢
stream-chat-android-compose 12.53 MB 12.55 MB 0.02 MB 🟢

@gpunto gpunto force-pushed the pr2-enhanced-mentions-endpoints branch from b09c5e0 to 47accb0 Compare June 9, 2026 08:00
@gpunto gpunto marked this pull request as ready for review June 10, 2026 07:18
@gpunto gpunto requested a review from a team as a code owner June 10, 2026 07:18
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 312531be-5f2b-4474-813a-daad0e82c587

📥 Commits

Reviewing files that changed from the base of the PR and between 5980c58 and 306aa68.

📒 Files selected for processing (26)
  • stream-chat-android-client/api/stream-chat-android-client.api
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api/ChatApi.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/MoshiChatApi.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/endpoint/RoleApi.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/endpoint/UserGroupApi.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/DomainMapping.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/DtoMapping.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/dto/DownstreamRoleDto.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/dto/PushPreferenceDtos.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/requests/UserGroupRequests.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/response/SearchRolesResponse.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/response/UserGroupResponses.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/di/ChatModule.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/internal/state/plugin/listener/internal/PushPreferencesListenerState.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/plugin/Plugin.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/plugin/listeners/PushPreferencesListener.kt
  • stream-chat-android-client/src/test/java/io/getstream/chat/android/client/ChatClientPushPreferencesApiTest.kt
  • stream-chat-android-client/src/test/java/io/getstream/chat/android/client/Mother.kt
  • stream-chat-android-client/src/test/java/io/getstream/chat/android/client/api2/MoshiChatApiTest.kt
  • stream-chat-android-client/src/test/java/io/getstream/chat/android/client/api2/MoshiChatApiTestArguments.kt
  • stream-chat-android-client/src/test/java/io/getstream/chat/android/client/internal/state/plugin/listener/internal/PushPreferencesListenerStateTest.kt
  • stream-chat-android-core/api/stream-chat-android-core.api
  • stream-chat-android-core/src/main/java/io/getstream/chat/android/models/ChatPreferences.kt
  • stream-chat-android-core/src/main/java/io/getstream/chat/android/models/PushPreference.kt
  • stream-chat-android-core/src/main/java/io/getstream/chat/android/models/Role.kt
🚧 Files skipped from review as they are similar to previous changes (17)
  • stream-chat-android-core/src/main/java/io/getstream/chat/android/models/Role.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/response/SearchRolesResponse.kt
  • stream-chat-android-client/src/test/java/io/getstream/chat/android/client/api2/MoshiChatApiTestArguments.kt
  • stream-chat-android-core/src/main/java/io/getstream/chat/android/models/ChatPreferences.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/DtoMapping.kt
  • stream-chat-android-client/src/test/java/io/getstream/chat/android/client/Mother.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/endpoint/RoleApi.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/endpoint/UserGroupApi.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/DomainMapping.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt
  • stream-chat-android-core/src/main/java/io/getstream/chat/android/models/PushPreference.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api/ChatApi.kt
  • stream-chat-android-client/src/test/java/io/getstream/chat/android/client/api2/MoshiChatApiTest.kt
  • stream-chat-android-client/api/stream-chat-android-client.api
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/MoshiChatApi.kt
  • stream-chat-android-core/api/stream-chat-android-core.api
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/di/ChatModule.kt

Walkthrough

Adds per-category chat-preference models and APIs, user-group CRUD/member operations, role search, DTO/domain mappings, MoshiChatApi implementations and DI wiring, ChatClient public methods and plugin/listener hooks, and accompanying tests.

Changes

User Group Management, Role Search, and Chat Preferences APIs

Layer / File(s) Summary
Domain Models
stream-chat-android-core/src/main/java/io/getstream/chat/android/models/ChatPreferences.kt, Role.kt, PushPreference.kt, stream-chat-android-core/api/stream-chat-android-core.api
New ChatPreferences and ChatPreferenceToggle; new Role; PushPreference extended to include optional chatPreferences.
DTOs and API Contracts
client/src/main/java/.../api2/model/dto/DownstreamRoleDto.kt, PushPreferenceDtos.kt, client/src/main/java/.../api2/model/requests/UserGroupRequests.kt, response/SearchRolesResponse.kt, UserGroupResponses.kt, endpoint/RoleApi.kt, endpoint/UserGroupApi.kt, api/ChatApi.kt
Added upstream/downstream chat-preference DTOs, role/user-group DTOs, request/response models, Retrofit interfaces for user groups and roles, and extended ChatApi declarations.
Mapping Layer
api2/mapping/DomainMapping.kt, DtoMapping.kt
Added converters: downstream chat preferences → domain, downstream role → Role; PushPreference mapping updated; ChatPreferences.toDto() added.
API Implementation & DI
api2/MoshiChatApi.kt, di/ChatModule.kt
MoshiChatApi now depends on UserGroupApi and RoleApi; implements setUserChatPreferences/setChannelChatPreferences, user-group CRUD/member ops, and searchRoles; DI wires new endpoints.
ChatClient Public API
src/main/java/io/getstream/chat/android/client/ChatClient.kt, api/stream-chat-android-client.api
New public methods: setUserChatPreferences, setChannelChatPreferences, create/query/search/get/update/delete user-group, add/remove user-group members, and searchRoles.
Plugins & Listener State
plugin/Plugin.kt, plugin/listeners/PushPreferencesListener.kt, internal/state/.../PushPreferencesListenerState.kt
New onChannelChatPreferencesSet callback on Plugin and PushPreferencesListener; listener state forwards successful channel preference updates to channel logic.
Tests
src/test/java/.../Mother.kt, api2/MoshiChatApiTest.kt, api2/MoshiChatApiTestArguments.kt, PushPreferencesListenerStateTest.kt, ChatClientPushPreferencesApiTest.kt
Added role DTO factory, fixtures and parameterized tests for chat preferences, user-group and role endpoints, test argument generators, and listener-state tests for new callbacks.

Sequence Diagram(s)

sequenceDiagram
  participant Client as ChatClient
  participant API as MoshiChatApi
  participant Retrofit as UserGroupApi/RoleApi/PushPreferencesApi
  participant Server as Stream API
  Client->>API: createUserGroup(name, id, ...)
  API->>Retrofit: call CreateUserGroupRequest
  Retrofit->>Server: POST /user_groups
  Server-->>Retrofit: UserGroupResponse
  Retrofit-->>API: Return DTO
  API->>API: map DTO -> UserGroup
  API-->>Client: Call<UserGroup>
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested labels

pr:test

Suggested reviewers

  • andremion
  • VelikovPetar

Poem

🐰 New groups hop into the chat today,
Roles and preferences light the way,
Per-category toggles spring to life,
Client, API, tests — all neat and spry,
Hooray for features, carrot cake, and rye!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.85% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main changes: adding ChatClient endpoints for user groups, roles, and chat preferences—matching the primary objective of the PR.
Description check ✅ Passed The description covers Goal, Implementation, and Testing sections as per template; it clearly explains the feature's purpose, the endpoints/models added, and testing coverage. Non-critical UI/checklist sections are not applicable to this backend/API-only change.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pr2-enhanced-mentions-endpoints

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt (1)

1736-1954: ⚡ Quick win

Add thread/state notes to these new public KDocs.

The new public APIs document parameters, but they don’t consistently state execution/thread expectations or client-state side effects (for example, setUserChatPreferences updates local user state on success). Please align this block with the module KDoc requirement.

As per coding guidelines, "Document public APIs with KDoc, including thread expectations and state notes."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt`
around lines 1736 - 1954, Update the public KDoc for the new APIs (e.g.,
setUserChatPreferences, setChannelChatPreferences, createUserGroup,
queryUserGroups, searchUserGroups, getUserGroup, updateUserGroup,
deleteUserGroup, addUserGroupMembers, removeUserGroupMembers, searchRoles) to
include thread/execution expectations (e.g., whether the call executes off the
main thread or is asynchronous) and explicit client-state side-effect notes (for
example, state that setUserChatPreferences updates mutableClientState.user on
success). For each function mention if callbacks/Results are delivered on a
background or main thread and whether the function mutates local client state or
requires additional synchronization; keep the descriptions short and consistent
with module KDoc guidelines.

Source: Coding guidelines

stream-chat-android-client/src/test/java/io/getstream/chat/android/client/api2/MoshiChatApiTest.kt (1)

2869-2914: ⚡ Quick win

Assert mapped chat-preferences in result, not only success type.

These two tests validate request payloads, but they don’t assert the returned mapped preferences from DownstreamChatPreferencesDto. Add value assertions on result.getOrThrow() so DTO→domain mapping regressions are caught.

Also applies to: 2916-2952

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@stream-chat-android-client/src/test/java/io/getstream/chat/android/client/api2/MoshiChatApiTest.kt`
around lines 2869 - 2914, The test testSetUserChatPreferences currently only
asserts a Result.Success type; extend it to assert the mapped domain preferences
returned by sut.setUserChatPreferences by calling result.getOrThrow() and
verifying that the chat preferences match the values from the
DownstreamChatPreferencesDto (direct_mentions="all", channel_mentions="none",
default_preference="none")—do the same change in the sibling test (the one
covering the other response case). Locate the mapping flow through
setUserChatPreferences, PushPreferencesResponse -> DownstreamPushPreferenceDto
-> DownstreamChatPreferencesDto and assert the resulting domain ChatPreferences
fields equal the expected domain values so DTO→domain regressions are caught.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt`:
- Around line 1758-1760: The method setChannelChatPreferences currently calls
api.setChannelChatPreferences directly and therefore skips the plugin/offline
callback flow used by setChannelPushPreference and
snoozeChannelPushNotifications; to fix this, add a plugin/state propagation
similar to the push-preference path: introduce a new callback in the
plugin/state interface (e.g., onChannelChatPreferenceSet) and corresponding
handler in PushPreferencesListenerState (or a new ChatPreferencesListenerState)
with an updateChannelChatPreference(...) method, then update
ChatClient.setChannelChatPreferences to invoke that plugin callback (and update
offline state) after a successful api.setChannelChatPreferences call so channel
chat preference updates stay synchronized with plugins/offline logic
(alternatively, if synchronization is intentionally handled elsewhere, add
documentation in setChannelChatPreferences describing that behavior).

---

Nitpick comments:
In
`@stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt`:
- Around line 1736-1954: Update the public KDoc for the new APIs (e.g.,
setUserChatPreferences, setChannelChatPreferences, createUserGroup,
queryUserGroups, searchUserGroups, getUserGroup, updateUserGroup,
deleteUserGroup, addUserGroupMembers, removeUserGroupMembers, searchRoles) to
include thread/execution expectations (e.g., whether the call executes off the
main thread or is asynchronous) and explicit client-state side-effect notes (for
example, state that setUserChatPreferences updates mutableClientState.user on
success). For each function mention if callbacks/Results are delivered on a
background or main thread and whether the function mutates local client state or
requires additional synchronization; keep the descriptions short and consistent
with module KDoc guidelines.

In
`@stream-chat-android-client/src/test/java/io/getstream/chat/android/client/api2/MoshiChatApiTest.kt`:
- Around line 2869-2914: The test testSetUserChatPreferences currently only
asserts a Result.Success type; extend it to assert the mapped domain preferences
returned by sut.setUserChatPreferences by calling result.getOrThrow() and
verifying that the chat preferences match the values from the
DownstreamChatPreferencesDto (direct_mentions="all", channel_mentions="none",
default_preference="none")—do the same change in the sibling test (the one
covering the other response case). Locate the mapping flow through
setUserChatPreferences, PushPreferencesResponse -> DownstreamPushPreferenceDto
-> DownstreamChatPreferencesDto and assert the resulting domain ChatPreferences
fields equal the expected domain values so DTO→domain regressions are caught.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 71ffc174-dba0-4ffa-a9bb-154028ce6f35

📥 Commits

Reviewing files that changed from the base of the PR and between 9e28643 and 5980c58.

📒 Files selected for processing (21)
  • stream-chat-android-client/api/stream-chat-android-client.api
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api/ChatApi.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/MoshiChatApi.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/endpoint/RoleApi.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/endpoint/UserGroupApi.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/DomainMapping.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/DtoMapping.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/dto/DownstreamRoleDto.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/dto/PushPreferenceDtos.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/requests/UserGroupRequests.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/response/SearchRolesResponse.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/response/UserGroupResponses.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/di/ChatModule.kt
  • stream-chat-android-client/src/test/java/io/getstream/chat/android/client/Mother.kt
  • stream-chat-android-client/src/test/java/io/getstream/chat/android/client/api2/MoshiChatApiTest.kt
  • stream-chat-android-client/src/test/java/io/getstream/chat/android/client/api2/MoshiChatApiTestArguments.kt
  • stream-chat-android-core/api/stream-chat-android-core.api
  • stream-chat-android-core/src/main/java/io/getstream/chat/android/models/ChatPreferences.kt
  • stream-chat-android-core/src/main/java/io/getstream/chat/android/models/PushPreference.kt
  • stream-chat-android-core/src/main/java/io/getstream/chat/android/models/Role.kt

gpunto added 5 commits June 10, 2026 09:47
Exposes the full /usergroups API surface: create, list (query), get,
update, delete, search by name prefix, and add/remove members. Adds
the matching DTOs and wires them through ChatApi/MoshiChatApi.
Exposes a new public ChatClient function backed by the `/roles/search`
endpoint. Adds the `Role` domain model and wires the response path
through the Moshi API layer.
Adds ChatPreferences with per-category toggles (direct, role, group,
here, channel mentions, thread replies, default fallback) alongside the
existing coarse PushPreferenceLevel. New ChatClient methods
setUserChatPreferences and setChannelChatPreferences hit the existing
/push_preferences endpoint with the chat_preferences payload, and the
response now hydrates PushPreference.chatPreferences so callers can
read back the active toggles.
@gpunto gpunto force-pushed the pr2-enhanced-mentions-endpoints branch from 5980c58 to 306aa68 Compare June 10, 2026 07:47
@gpunto gpunto marked this pull request as draft June 10, 2026 07:51
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
61.9% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@gpunto

gpunto commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@gpunto gpunto marked this pull request as ready for review June 10, 2026 08:20
public fun searchRoles(
query: String,
limit: Int? = null,
roleType: String? = null,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small thing: roleType is only ever "user" or "channel", but it's a plain String here. You wrap the other closed sets in this PR (ChatPreferenceToggle), and PushPreferenceLevel does the same, so this one is inconsistent. Since it's a public API, changing to a typed value later would be a breaking change. Want to wrap it now, or keep it as a String on purpose?

* Per-category push toggles. A null field means "use the server default". When set on a
* [PushPreference], takes precedence over [PushPreference.level].
*/
public data class ChatPreferences(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Role and UserGroup from PR 1 both have @Immutable, but ChatPreferences and ChatPreferenceToggle don't. They are immutable value types that end up in Compose state via PushPreference.chatPreferences, so they would benefit from it too. Is it on purpose?


@ParameterizedTest
@MethodSource("io.getstream.chat.android.client.api2.MoshiChatApiTestArguments#searchRolesInput")
fun testSearchRoles(call: RetrofitCall<SearchRolesResponse>, expected: KClass<*>) = runTest {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These check the request shape and Success/Failure, but nothing asserts the actual mapped Role / UserGroup fields, so a mistake in DownstreamRoleDto.toDomain() would not be caught. The mappings are trivial 1:1, so the risk is low. Maybe add one assertion on a mapped field to cover it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:new-feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants