Skip to content

feat: integrate in-room chat cloud function with mute support#834

Open
Muneerali199 wants to merge 1 commit into
AOSSIE-Org:state_migrationfrom
Muneerali199:feat/in-room-chat
Open

feat: integrate in-room chat cloud function with mute support#834
Muneerali199 wants to merge 1 commit into
AOSSIE-Org:state_migrationfrom
Muneerali199:feat/in-room-chat

Conversation

@Muneerali199

Copy link
Copy Markdown

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 fallback
  • deleteMessage(): Uses cloud function for authorized deletion (creator or admin) with direct DB fallback
  • New muteUser(targetUid): Admin-only mute via cloud function
  • New unmuteUser(targetUid): Admin-only unmute via cloud function
  • New checkMuteStatus(): Checks if current user is muted on chat open
  • New isMuted observable for reactive UI
  • New isAdmin getter

lib/views/screens/room_chat_screen.dart

  • Muted banner at top of chat when user is muted
  • Input field disabled with "You are muted" hint when muted
  • Send button disabled when muted
  • "Mute user" option in long-press context menu (admin only, excludes self)
  • Admin check uses existing appwriteRoom.isUserAdmin

lib/utils/constants.dart

  • Added chatFunctionId and chatMutesTableId constants

Setup

After deploying the chat cloud function (Resonate-Backend PR #173), set chatFunctionId in constants.dart to the deployed function ID.

Related

- 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
@Muneerali199 Muneerali199 requested a review from M4dhav as a code owner June 30, 2026 21:23
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ceb8e9f2-392e-43c1-b9dd-52b1be5585a6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with 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.

❤️ Share

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

@github-actions

Copy link
Copy Markdown
Contributor

🎉 Welcome @Muneerali199!
Thank you for your pull request! Our team will review it soon. 🔍

  • Please ensure your PR follows the contribution guidelines. ✅
  • All automated tests should pass before merging. 🔄
  • If this PR fixes an issue, link it in the description. 🔗

We appreciate your contribution! 🚀

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant