Open ttypic opened 6 days ago
The changes in this pull request involve significant modifications to the Room
and RoomReactions
classes in the Ably chat application. The DefaultRoom
class now constructs the reactions
instance using clientId
and realtimeChannels
, while the RoomReactions
class has seen the implementation of methods for sending and subscribing to reactions. Additionally, a new coroutine-based function publishCoroutine
has been added to the Channel
class, and unit tests for DefaultRoomReactions
have been introduced to validate its functionality.
File Path | Change Summary |
---|---|
chat-android/src/main/java/com/ably/chat/Room.kt |
Modified DefaultRoom to replace realtimeClient with clientId and realtimeChannels in reactions . |
chat-android/src/main/java/com/ably/chat/RoomReactions.kt |
Updated DefaultRoomReactions constructor to use clientId and realtimeChannels , implemented send and subscribe methods. |
chat-android/src/main/java/com/ably/chat/Utils.kt |
Added new method suspend fun Channel.publishCoroutine(message: PubSubMessage) . |
chat-android/src/test/java/com/ably/chat/RoomReactionsTest.kt |
Introduced unit tests for DefaultRoomReactions , validating channel naming and subscription functionality. |
example/build.gradle.kts |
Added dependency for konfetti library. |
example/src/main/java/com/ably/chat/example/MainActivity.kt |
Added receivedReactions variable and modified ChatInputField for handling reactions. |
gradle/libs.versions.toml |
Added version and library declaration for konfetti-compose . |
Objective | Addressed | Explanation |
---|---|---|
Implement room level reactions (ECO-4944) | ✅ |
Room
interface and DefaultRoom
class are foundational for the chat room feature, which aligns with the overall objectives of establishing a chat room skeleton as described in this PR.Room
and RoomReactions
classes are directly related to the implementation of message handling and reactions in the chat application, which is a key focus of this PR on sending and receiving messages.Room
and RoomReactions
functionalities, particularly in how messages and reactions are handled within the chat context.In the chat room where bunnies play,
Reactions hop in a joyful way.
With messages sent, and laughter shared,
Our new features show how much we cared.
So let's celebrate this code delight,
As we chat and react, all day and night! 🐰✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Room level reactions implementation
Summary by CodeRabbit
New Features
RoomReactions
functionality to allow sending and subscribing to reactions in real-time.Channel
class.Bug Fixes
subscribe
method for incoming messages.Tests
DefaultRoomReactions
class to verify channel naming and subscription behavior.Chores
konfetti
library for use with Jetpack Compose.konfetti-compose
to version2.0.4
.