Overview
I’m trying to implement a block function for my Live Chat ListView in FlutterFlow, using Supabase as the backend. The goal is to allow users to block others so that they no longer see messages from blocked users in the chat.
Current Setup
Messages Table (
messages
)id
(UUID)user_id
(UUID) → Referencesauth.users.id
(Sender of the message)message
(TEXT)created_at
(TIMESTAMP)
Blocked Users Table (
blocked_users
)id
(UUID)blocked_by
(UUID) → User who blocked someoneblocked_user
(UUID) → User who was blockedcreated_at
(TIMESTAMP)UNIQUE (blocked_by, blocked_user)
→ Prevents duplicate blocks
Listview has a backend query to the messages table, single time query disabled.