feat: integrate in-room chat cloud function with mute support#834
feat: integrate in-room chat cloud function with mute support#834Muneerali199 wants to merge 1 commit into
Conversation
- Update sendMessage to use cloud function (with direct DB fallback) - Update deleteMessage to use cloud function (with direct DB fallback) - Add mute/unmute functionality via cloud function - Add checkMuteStatus on chat open - Add muted banner when user is muted - Disable send button when muted - Add 'Mute user' option in admin's long-press context menu - Add chatFunctionId and chatMutesTableId constants Requires backend PR AOSSIE-Org/Resonate-Backend#173
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
🎉 Welcome @Muneerali199!
We appreciate your contribution! 🚀 |
Description
Closes #730
Integrates the in-room chat backend (Resonate-Backend PR #173) into the Flutter frontend, and adds mute moderation support.
Changes
lib/controllers/room_chat_controller.dart
sendMessage(): Uses cloud function for server-validated sends (participant check, mute check) with direct DB fallbackdeleteMessage(): Uses cloud function for authorized deletion (creator or admin) with direct DB fallbackmuteUser(targetUid): Admin-only mute via cloud functionunmuteUser(targetUid): Admin-only unmute via cloud functioncheckMuteStatus(): Checks if current user is muted on chat openisMutedobservable for reactive UIisAdmingetterlib/views/screens/room_chat_screen.dart
appwriteRoom.isUserAdminlib/utils/constants.dart
chatFunctionIdandchatMutesTableIdconstantsSetup
After deploying the chat cloud function (Resonate-Backend PR #173), set
chatFunctionIdin constants.dart to the deployed function ID.Related