-
Notifications
You must be signed in to change notification settings - Fork 368
feat(llc): add support for push preferences #2350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds push-preferences support: new models, serialization, API endpoint client, client method Changes
Sequence Diagram(s)sequenceDiagram
participant App
participant StreamChatClient
participant DeviceApi
participant Server
App->>StreamChatClient: setPushPreferences(preferences)
StreamChatClient->>DeviceApi: setPushPreferences(preferences)
DeviceApi->>Server: POST /push_preferences (body: preferences)
Server-->>DeviceApi: 200 + payload (user_preferences, user_channel_preferences)
DeviceApi-->>StreamChatClient: UpsertPushPreferencesResponse
StreamChatClient-->>App: UpsertPushPreferencesResponse
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Assessment against linked issues
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
🧹 Nitpick comments (8)
packages/stream_chat/lib/src/client/channel.dart (1)
3305-3306
: Propagating channel pushPreferences in state updates — LGTMThis correctly threads ChannelState.pushPreferences through updateChannelState. With copyWith using
pushPreferences ?? this.pushPreferences
, nulls won’t inadvertently clear existing values.Optional: expose convenience accessors on Channel to keep API parity with other fields.
Example (outside the shown lines):
// In class Channel: ChannelPushPreference? get pushPreferences { _checkInitialized(); return state?._channelState.pushPreferences; } Stream<ChannelPushPreference?> get pushPreferencesStream { _checkInitialized(); return state!.channelStateStream.map((cs) => cs.pushPreferences); }packages/stream_chat/CHANGELOG.md (1)
8-12
: Use consistent API naming in CHANGELOGElsewhere the doc uses
client.methodName()
orStreamChatClient.methodName
. Here it saysClient.setPushPreferences
. Recommend aligning for consistency and clarity.Apply:
- - Added support for `Client.setPushPreferences` which allows setting PushPreferences for the - current user or for a specific channel. + - Added support for `client.setPushPreferences()` which allows setting push notification + preferences for the current user or for a specific channel.packages/stream_chat/lib/src/core/models/channel_state.dart (1)
7-7
: ChannelState gains pushPreferences — LGTM; consider allowing explicit unsettingThe field, constructor, and copyWith wiring look correct and consistent with other fields. Current copyWith uses
pushPreferences ?? this.pushPreferences
, which preserves existing values if null is passed.Optional: If you foresee clearing this value (setting it to null) via copyWith, mirror the sentinel approach used for
draft
:- ChannelState copyWith({ + ChannelState copyWith({ ChannelModel? channel, List<Message>? messages, List<Member>? members, List<Message>? pinnedMessages, int? watcherCount, List<User>? watchers, List<Read>? read, Member? membership, - Object? draft = _nullConst, - ChannelPushPreference? pushPreferences, + Object? draft = _nullConst, + Object? pushPreferences = _nullConst, }) => ChannelState( channel: channel ?? this.channel, messages: messages ?? this.messages, members: members ?? this.members, pinnedMessages: pinnedMessages ?? this.pinnedMessages, watcherCount: watcherCount ?? this.watcherCount, watchers: watchers ?? this.watchers, read: read ?? this.read, membership: membership ?? this.membership, draft: draft == _nullConst ? this.draft : draft as Draft?, - pushPreferences: pushPreferences ?? this.pushPreferences, + pushPreferences: pushPreferences == _nullConst + ? this.pushPreferences + : pushPreferences as ChannelPushPreference?, );Also applies to: 23-34, 63-65, 84-85, 96-97
packages/stream_chat/lib/src/core/api/device_api.dart (1)
1-1
: Remove unused importAfter removing
jsonEncode
,dart:convert
is no longer needed.-import 'dart:convert';
packages/stream_chat/lib/src/client/client.dart (1)
1035-1039
: Optionally update in-memory state after upsertConsider updating
state.currentUser.pushPreferences
from the response to keep local state in sync without waiting for a user-updated event.- Future<UpsertPushPreferencesResponse> setPushPreferences( - List<PushPreferenceInput> preferences, - ) { - return _chatApi.device.setPushPreferences(preferences); - } + Future<UpsertPushPreferencesResponse> setPushPreferences( + List<PushPreferenceInput> preferences, + ) async { + final res = await _chatApi.device.setPushPreferences(preferences); + final uid = state.currentUser?.id; + if (uid != null) { + final pref = res.userPreferences[uid]; + if (pref != null) { + state.currentUser = state.currentUser?.copyWith(pushPreferences: pref); + } + } + return res; + }packages/stream_chat/test/src/core/api/device_api_test.dart (1)
136-210
: Reset mock between tests to avoid leakageAll tests share the same
MockHttpClient
instance.
Althoughmocktail
clears recorded interactions after eachverify*
, the stubs themselves accumulate, which can lead to surprising behaviour when later tests stub the same method/args combo.setUp(() { - deviceApi = DeviceApi(client); + reset(client); // clear stubs & interactions + deviceApi = DeviceApi(client); });packages/stream_chat/lib/src/core/models/push_preference.dart (2)
45-51
: Constrain invalid combinations in the input constructors.To prevent ambiguous payloads:
removeDisable
should not be used together withdisabledUntil
.- For channel-scoped input,
callLevel
is likely not supported (server typically only supports chat-level per channel).const PushPreferenceInput({ this.callLevel, this.chatLevel, this.disabledUntil, this.removeDisable, - }) : channelCid = null; + }) : channelCid = null, + assert(!(removeDisable == true && disabledUntil != null), + 'removeDisable and disabledUntil are mutually exclusive'); @@ const PushPreferenceInput.channel({ required String this.channelCid, this.callLevel, this.chatLevel, this.disabledUntil, this.removeDisable, - }); + }) : assert(!(removeDisable == true && disabledUntil != null), + 'removeDisable and disabledUntil are mutually exclusive'), + assert(callLevel == null, + 'callLevel is not supported for channel-scoped preferences');If the backend actually allows
callLevel
per-channel, drop the second assert and update docs to clarify supported combos.Also applies to: 54-61
74-76
: Clarify theremoveDisable
docstring.- /// Temporary flag for resetting disabledUntil + /// When true, clears any existing [disabledUntil] on the server (resets snooze).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (16)
packages/stream_chat/CHANGELOG.md
(1 hunks)packages/stream_chat/lib/src/client/channel.dart
(1 hunks)packages/stream_chat/lib/src/client/client.dart
(2 hunks)packages/stream_chat/lib/src/core/api/device_api.dart
(2 hunks)packages/stream_chat/lib/src/core/api/responses.dart
(2 hunks)packages/stream_chat/lib/src/core/api/responses.g.dart
(1 hunks)packages/stream_chat/lib/src/core/models/channel_state.dart
(6 hunks)packages/stream_chat/lib/src/core/models/channel_state.g.dart
(2 hunks)packages/stream_chat/lib/src/core/models/own_user.dart
(6 hunks)packages/stream_chat/lib/src/core/models/own_user.g.dart
(1 hunks)packages/stream_chat/lib/src/core/models/push_preference.dart
(1 hunks)packages/stream_chat/lib/src/core/models/push_preference.g.dart
(1 hunks)packages/stream_chat/lib/stream_chat.dart
(1 hunks)packages/stream_chat/test/src/core/api/device_api_test.dart
(1 hunks)packages/stream_chat/test/src/core/api/responses_test.dart
(1 hunks)packages/stream_chat/test/src/core/models/push_preference_test.dart
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-08T14:27:59.609Z
Learnt from: xsahil03x
PR: GetStream/stream-chat-flutter#2348
File: packages/stream_chat_flutter_core/lib/src/stream_channel.dart:383-406
Timestamp: 2025-08-08T14:27:59.609Z
Learning: In stream_chat_flutter_core/lib/src/stream_channel.dart, threads (replies) do not support around-anchor loading. Thread replies are fetched as: initial latest page via StreamChannelState.getReplies(), and further pagination via StreamChannelState.queryReplies(parentId, direction: top|bottom). Anchored loads apply only to channel messages, not to threads.
Applied to files:
packages/stream_chat/lib/src/client/client.dart
packages/stream_chat/lib/src/core/api/responses.dart
🪛 GitHub Actions: legacy_version_analyze
packages/stream_chat/lib/src/core/models/push_preference.dart
[error] 84-84: Missing documentation for a public member. Try adding documentation for the member. (public_member_api_docs)
[error] 113-113: Missing documentation for a public member. Try adding documentation for the member. (public_member_api_docs)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
- GitHub Check: test
- GitHub Check: build (ios)
- GitHub Check: build (android)
- GitHub Check: analyze
- GitHub Check: stream_chat_flutter_core
- GitHub Check: stream_chat_localizations
- GitHub Check: stream_chat_flutter
- GitHub Check: stream_chat
- GitHub Check: stream_chat_persistence
🔇 Additional comments (9)
packages/stream_chat/lib/stream_chat.dart (1)
57-57
: Export push_preference.dart — LGTMModels are now publicly accessible through the main library. No issues.
packages/stream_chat/lib/src/core/models/own_user.g.dart (1)
29-33
: Incorrect suggestion ontoJson
generation for OwnUserThe deserialization of
push_preferences
is correct, but theOwnUser
model is annotated with@JsonSerializable(createToJson: false)which explicitly disables any generated
toJson
method. As a result, there is notoJson
counterpart in the.g.dart
file and no fields—pushPreferences or otherwise—will be serialized.If you do need to serialize
OwnUser
(includingpushPreferences
), you should remove or change thecreateToJson: false
setting on@JsonSerializable
. Otherwise, the absence of atoJson
implementation is intentional.Likely an incorrect or invalid review comment.
packages/stream_chat/lib/src/client/client.dart (1)
34-34
: Import looks goodThe import exposes the new types to the client API; consistent with other model imports.
packages/stream_chat/lib/src/core/models/own_user.dart (1)
21-22
: OwnUser pushPreferences wiring looks correct
- Field added with proper JSON key and null exclusion.
- Propagated through
copyWith
,merge
, andtopLevelFields
.- Matches the new push preference model types.
Also applies to: 88-89, 116-117, 178-181, 193-194
packages/stream_chat/test/src/core/api/responses_test.dart (1)
4449-4521
: Great addition – covers the critical deserialization pathsThe new test exercises both user-level and channel-level preference maps and enumerations – nice job.
packages/stream_chat/test/src/core/models/push_preference_test.dart (1)
1-103
: Model tests look solidThorough round-trip checks for enum mapping and date handling – nothing to add.
packages/stream_chat/lib/src/core/models/push_preference.g.dart (1)
9-22
: No action required: Dart SDK constraint already enforces Dart 3
pubspec.yaml declaresenvironment: sdk: ^3.6.2
, which satisfies the Dart 3 requirement for collection if-case pattern syntax.packages/stream_chat/lib/src/core/models/push_preference.dart (2)
6-23
: Enums look solid; JSON mappings are correct.Good choice using
defaultValue
mapped to"default"
to avoid the reserved keyword while keeping wire format stable.Also applies to: 25-38
71-76
: Confirm DateTime serialization consistencyPushPreference.disabledUntil (lines 71–76, 99–101, 124–126) is using the default
toIso8601String
/DateTime.parse
behavior, just like all other models (e.g. Read, UnreadCounts). There is currently no shared UTC converter in the repo.• If your backend requires UTC-only timestamps, consider introducing a
DateTimeUtcConverter
and annotating eachdisabledUntil
field:
- packages/stream_chat/lib/src/core/models/push_preference.dart (lines 71–76)
- packages/stream_chat/lib/src/core/models/push_preference.dart (lines 99–101)
- packages/stream_chat/lib/src/core/models/push_preference.dart (lines 124–126)
• Otherwise, the default ISO8601 serialization is consistent with the rest of the codebase.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2350 +/- ##
==========================================
+ Coverage 63.80% 63.81% +0.01%
==========================================
Files 411 412 +1
Lines 25793 25824 +31
==========================================
+ Hits 16457 16480 +23
- Misses 9336 9344 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
packages/stream_chat/lib/src/core/api/responses.dart
(2 hunks)packages/stream_chat/lib/src/core/api/responses.g.dart
(1 hunks)packages/stream_chat/lib/src/core/models/push_preference.dart
(1 hunks)packages/stream_chat/lib/src/core/models/push_preference.g.dart
(1 hunks)packages/stream_chat/test/fixtures/channel_state_to_json.json
(1 hunks)packages/stream_chat/test/src/core/api/device_api_test.dart
(1 hunks)packages/stream_chat/test/src/core/api/responses_test.dart
(1 hunks)packages/stream_chat/test/src/core/models/channel_state_test.dart
(1 hunks)packages/stream_chat/test/src/core/models/push_preference_test.dart
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/stream_chat/test/fixtures/channel_state_to_json.json
🚧 Files skipped from review as they are similar to previous changes (7)
- packages/stream_chat/lib/src/core/api/responses.g.dart
- packages/stream_chat/test/src/core/api/device_api_test.dart
- packages/stream_chat/test/src/core/models/push_preference_test.dart
- packages/stream_chat/lib/src/core/api/responses.dart
- packages/stream_chat/test/src/core/api/responses_test.dart
- packages/stream_chat/lib/src/core/models/push_preference.g.dart
- packages/stream_chat/lib/src/core/models/push_preference.dart
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: stream_chat_localizations
- GitHub Check: stream_chat_flutter
- GitHub Check: stream_chat_persistence
- GitHub Check: stream_chat_flutter_core
- GitHub Check: stream_chat
- GitHub Check: build (android)
- GitHub Check: build (ios)
- GitHub Check: analyze
- GitHub Check: test
- GitHub Check: analyze_legacy_versions
This commit introduces the ability to manage push notification preferences for users and channels. **New Models:** - `PushPreferenceInput`: Used for creating or updating preferences. - `PushPreference`: Represents user-level push preferences. - `ChannelPushPreference`: Represents channel-specific push preferences. - `ChatLevelPushPreference` enum: Defines chat notification levels (all, none, mentions, default). - `CallLevelPushPreference` enum: Defines call notification levels (all, none, default). **API Changes:** - `DeviceApi.setPushPreferences(List<PushPreferenceInput> preferences)`: New method to set user or channel-specific push preferences. - `UpsertPushPreferencesResponse`: New response model for `setPushPreferences`. **Model Updates:** - `OwnUser`: Added `pushPreferences` field. - `ChannelState`: Added `pushPreferences` field. **Client Method:** - `StreamChatClient.setPushPreferences(List<PushPreferenceInput> preferences)`: New client method to interact with the `setPushPreferences` API.
This commit replaces the `enum` types for `ChatLevelPushPreference` and `CallLevelPushPreference` with `extension type`s named `ChatLevel` and `CallLevel` respectively. This change allows for more flexibility in how these values are handled, particularly in JSON serialization and deserialization, while maintaining type safety. Key changes: - `ChatLevelPushPreference` and `CallLevelPushPreference` enums are removed. - `ChatLevel` and `CallLevel` extension types are introduced. - JSON serialization and deserialization logic for `PushPreference`, `ChannelPushPreference`, and `PushPreferenceInput` has been updated to use the new extension types directly as `String` values, removing the need for `EnumMap` lookups. - `UpsertPushPreferencesResponse` now includes a `defaultValue` of `{}` for `userPreferences` and `userChannelPreferences` to prevent potential null issues during deserialization. - Tests have been updated to reflect these changes.
69236ca
to
9e926c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (3)
packages/stream_chat/test/src/core/models/channel_state_test.dart (1)
62-65
: Add deserialization test for pushPreferences in ChannelStateThe past review comment about adding a deserialization test is still applicable. While the serialization test correctly verifies
toJson()
includes pushPreferences, we also need to test thatChannelState.fromJson()
properly deserializes the push_preferences field.packages/stream_chat/lib/src/core/models/push_preference.dart (2)
35-36
: Enforce snake_case JSON field naming for PushPreference modelsThe past review comment about adding
fieldRename: FieldRename.snake
to the@JsonSerializable
annotations is still valid and should be addressed to ensure proper JSON field naming consistency with the Stream API.
88-95
: Consider adding unknownEnumValue handling for robust enum deserializationThe past review comment about adding
unknownEnumValue
handling for enum fields is a good defensive programming practice that should be considered to prevent crashes when the API returns new enum values in the future.
🧹 Nitpick comments (2)
packages/stream_chat/test/src/db/chat_persistence_client_test.dart (2)
253-256
: Await the async call or make the test syncThe test body is async but the Future from updateChannelState isn’t awaited. Prefer awaiting to ensure the operation completes before the test ends (or drop async if not needed).
Option A (await the call):
- test('updateChannelState', () async { - const channelState = ChannelState(); - persistenceClient.updateChannelState(channelState); - }); + test('updateChannelState', () async { + const channelState = ChannelState(); + await persistenceClient.updateChannelState(channelState); + });Option B (make test synchronous if the method is sync):
- test('updateChannelState', () async { + test('updateChannelState', () { const channelState = ChannelState(); persistenceClient.updateChannelState(channelState); });
253-256
: Add coverage for pushPreferences in ChannelStateGiven the PR adds ChannelState.pushPreferences, consider extending this or the updateChannelStates test to include a ChannelState with pushPreferences populated to exercise persistence/serialization pathways.
Happy to draft a test snippet once the final shape of ChannelPushPreference and related enums is confirmed.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (22)
packages/stream_chat/CHANGELOG.md
(1 hunks)packages/stream_chat/lib/src/client/channel.dart
(1 hunks)packages/stream_chat/lib/src/client/client.dart
(3 hunks)packages/stream_chat/lib/src/core/api/device_api.dart
(2 hunks)packages/stream_chat/lib/src/core/api/responses.dart
(2 hunks)packages/stream_chat/lib/src/core/api/responses.g.dart
(1 hunks)packages/stream_chat/lib/src/core/models/channel_state.dart
(6 hunks)packages/stream_chat/lib/src/core/models/channel_state.g.dart
(2 hunks)packages/stream_chat/lib/src/core/models/own_user.dart
(7 hunks)packages/stream_chat/lib/src/core/models/own_user.g.dart
(1 hunks)packages/stream_chat/lib/src/core/models/push_preference.dart
(1 hunks)packages/stream_chat/lib/src/core/models/push_preference.g.dart
(1 hunks)packages/stream_chat/lib/stream_chat.dart
(1 hunks)packages/stream_chat/test/fixtures/channel_state_to_json.json
(1 hunks)packages/stream_chat/test/src/core/api/device_api_test.dart
(1 hunks)packages/stream_chat/test/src/core/api/responses_test.dart
(1 hunks)packages/stream_chat/test/src/core/models/channel_state_test.dart
(1 hunks)packages/stream_chat/test/src/core/models/push_preference_test.dart
(1 hunks)packages/stream_chat/test/src/db/chat_persistence_client_test.dart
(1 hunks)packages/stream_chat_flutter/test/src/mocks.dart
(1 hunks)packages/stream_chat_flutter_core/test/message_list_core_test.dart
(1 hunks)packages/stream_chat_flutter_core/test/stream_channel_test.dart
(6 hunks)
🚧 Files skipped from review as they are similar to previous changes (18)
- packages/stream_chat/test/src/core/api/device_api_test.dart
- packages/stream_chat/lib/src/core/api/device_api.dart
- packages/stream_chat/test/fixtures/channel_state_to_json.json
- packages/stream_chat/test/src/core/api/responses_test.dart
- packages/stream_chat/lib/src/core/models/push_preference.g.dart
- packages/stream_chat/lib/stream_chat.dart
- packages/stream_chat/lib/src/core/api/responses.g.dart
- packages/stream_chat_flutter_core/test/message_list_core_test.dart
- packages/stream_chat_flutter/test/src/mocks.dart
- packages/stream_chat/lib/src/client/channel.dart
- packages/stream_chat/CHANGELOG.md
- packages/stream_chat_flutter_core/test/stream_channel_test.dart
- packages/stream_chat/lib/src/core/api/responses.dart
- packages/stream_chat/lib/src/core/models/channel_state.g.dart
- packages/stream_chat/lib/src/core/models/own_user.dart
- packages/stream_chat/lib/src/core/models/own_user.g.dart
- packages/stream_chat/lib/src/client/client.dart
- packages/stream_chat/lib/src/core/models/channel_state.dart
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: stream_chat_flutter
- GitHub Check: stream_chat
- GitHub Check: stream_chat_localizations
- GitHub Check: stream_chat_flutter_core
- GitHub Check: stream_chat_persistence
- GitHub Check: analyze_legacy_versions
- GitHub Check: build (ios)
- GitHub Check: analyze
- GitHub Check: build (android)
- GitHub Check: test
🔇 Additional comments (4)
packages/stream_chat/test/src/db/chat_persistence_client_test.dart (1)
254-254
: LGTM on using const ChannelState()This aligns with the const constructor for ChannelState and encourages immutability and canonicalization.
packages/stream_chat/test/src/core/models/push_preference_test.dart (1)
1-103
: Excellent test coverage for push preference modelsThe test suite provides comprehensive coverage of all three push preference models:
- Thorough serialization testing for both user-level and channel-specific preferences
- Proper verification of enum handling including default values
- DateTime serialization/deserialization testing
- Good test organization with logical grouping
The tests correctly verify JSON field naming (snake_case) and cover all the key use cases for the push preference functionality.
packages/stream_chat/lib/src/core/models/push_preference.dart (2)
7-31
: Well-designed extension types for type-safe enumsThe use of extension types for
ChatLevel
andCallLevel
provides excellent type safety while maintaining String compatibility. The enum values are well-chosen:
- ChatLevel: all, none, mentions, defaultValue
- CallLevel: all, none, defaultValue (appropriately excludes mentions)
This approach is more type-safe than plain String constants and integrates well with JSON serialization.
36-72
: Good design for flexible preference inputThe
PushPreferenceInput
class design is well thought out:
- Default constructor for user-level preferences
- Named
.channel()
constructor for channel-specific preferences- Appropriate field validation through the constructor design
createFactory: false
is correct since this is input-onlyThe API design makes it clear when you're setting user vs channel preferences.
Submit a pull request
Fixes: #2346
Description of the pull request
This commit introduces the ability to manage push notification preferences for users and channels.
New Models:
PushPreferenceInput
: Used for creating or updating preferences.PushPreference
: Represents user-level push preferences.ChannelPushPreference
: Represents channel-specific push preferences.ChatLevelPushPreference
enum: Defines chat notification levels (all, none, mentions, default).CallLevelPushPreference
enum: Defines call notification levels (all, none, default).API Changes:
DeviceApi.setPushPreferences(List<PushPreferenceInput> preferences)
: New method to set user or channel-specific push preferences.UpsertPushPreferencesResponse
: New response model forsetPushPreferences
.Model Updates:
OwnUser
: AddedpushPreferences
field.ChannelState
: AddedpushPreferences
field.Client Method:
StreamChatClient.setPushPreferences(List<PushPreferenceInput> preferences)
: New client method to interact with thesetPushPreferences
API.Summary by CodeRabbit