Skip to content

feat: enable config to set channel to private#61

Open
diegofesanto wants to merge 1 commit into
masterfrom
feature/private-channel
Open

feat: enable config to set channel to private#61
diegofesanto wants to merge 1 commit into
masterfrom
feature/private-channel

Conversation

@diegofesanto

@diegofesanto diegofesanto commented Nov 6, 2025

Copy link
Copy Markdown
Collaborator

What kind of change does this PR introduce?

feature

What is the current behavior?

It doesn't have the option to set channel to private

What is the new behavior?

  • Enable config to set channel to private
  • Enable replay on broadcast if the channel is private

Additional context

- insert config to get replay from broadcast
@diegofesanto
diegofesanto requested a review from grdsdev November 6, 2025 00:28
@SLOSK

SLOSK commented Jul 13, 2026

Copy link
Copy Markdown

I need this as well so I thought I would try to put in some effort. I was not able to get it working, but one bit of feedback...

I think there should be a default for channel options:

using a public channel:

var channel =
                    SupabaseClient.supabase
                        .Realtime
                        .Channel($"test");

using a private channel:

        ChannelOptions channelOptions = new ChannelOptions(
            SupabaseClient.supabase.Realtime.Options,
            () => SupabaseClient.supabase.Auth.CurrentSession.AccessToken,
            SupabaseClient.supabase.Realtime.SerializerSettings,
            true
        );

        var channel =
                    SupabaseClient.supabase
                        .Realtime
                        .Channel($"test", channelOptions);

I needed to look at the Channel(channelName) overload to see what the defaults are and recreate them.

As for the feature itself. Not sure why mine is failing. I am getting: "RealtimeException: {"ref":"eab379c2-0025-4721-bf1d-2faf105955dd","event":"phx_reply","payload":{"status":"error","response":{"reason":"Unauthorized: You do not have permissions to read from this Channel topic: test"}},"topic":"realtime:test"}"

Let me know if I can help out further in anyway, but for my own needs I'll use http to access broadcasts.

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.

2 participants