Issue: Implementing a Block Function in Live Chat (Supabase)

Actions & Logic

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

  1. Messages Table (messages)

    • id (UUID)

    • user_id (UUID) → References auth.users.id (Sender of the message)

    • message (TEXT)

    • created_at (TIMESTAMP)

  2. Blocked Users Table (blocked_users)

    • id (UUID)

    • blocked_by (UUID) → User who blocked someone

    • blocked_user (UUID) → User who was blocked

    • created_at (TIMESTAMP)

    • UNIQUE (blocked_by, blocked_user)Prevents duplicate blocks

Listview has a backend query to the messages table, single time query disabled.

What have you tried so far?

Blocking Users Successfully

  • When a user blocks someone, a row is added to the blocked_users table.

  • "Block User" Button: Inserts a row into blocked_users using Supabase Backend Call.

Issue: Filtering Messages from Blocked Users

  • I need to filter the ListView query so that users don’t see messages from people they’ve blocked.

  • Problem: FlutterFlow’s Supabase Query does not support "Not In" filtering, so I can’t exclude messages from blocked users directly.

Did you check FlutterFlow's Documentation for this topic?
No
1