Skip to content

[CHA-1700] Add Future Channel Bans support#368

Merged
adityaalifn merged 4 commits intomasterfrom
feature/future-channel-bans
Jan 23, 2026
Merged

[CHA-1700] Add Future Channel Bans support#368
adityaalifn merged 4 commits intomasterfrom
feature/future-channel-bans

Conversation

@totalimmersion
Copy link
Contributor

Summary

Add support for the Future Channel Bans feature.

New Parameters

  • BanFromFutureChannels field in BanOptions struct
  • RemoveFutureChannelsBan field in UnbanOptions struct

Usage

// Ban user from current channel and all future channels created by banner
channel.BanUser(ctx, "user-id", &stream.BanOptions{
    BanFromFutureChannels: true,
    Reason: "spam",
})

// Remove future channel ban (does NOT remove existing channel bans)
client.UnbanUser(ctx, "user-id", &stream.UnbanOptions{
    ChannelCID: "messaging:channel-id",
    CreatedBy: "banner-user-id",
    RemoveFutureChannelsBan: true,
})

// Query future channel bans
response, _ := client.QueryFutureChannelBans(ctx, &stream.QueryFutureChannelBansRequest{
    FilterConditions: map[string]interface{}{
        "created_by_id": "banner-user-id",
    },
})

Related PRs

Linear

  • CHA-1700

🤖 Generated with Claude Code

totalimmersion and others added 3 commits January 17, 2026 14:02
- Add BanWithBanFromFutureChannels option for banning users from future channels
- Add UnbanOption type and UnbanWithRemoveFutureChannelsBan option
- Modify UnBanUser methods (Client and Channel) to accept options
- Add QueryFutureChannelBans method with FutureChannelBan type
- Add QueryFutureChannelBansOptions and QueryFutureChannelBansResponse types
Add target_user_id parameter to allow filtering future channel bans
by target user, especially for client-side requests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Test the new target_user_id parameter for filtering future channel bans.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@adityaalifn adityaalifn marked this pull request as ready for review January 23, 2026 14:31
Add missing required parameters for future channel bans:
- BanWithChannel: sets channel context, required when using
  BanWithBanFromFutureChannels at client level
- UnbanWithCreatedBy: sets the user who created the ban, required
  when using UnbanWithRemoveFutureChannelsBan

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@adityaalifn adityaalifn enabled auto-merge (squash) January 23, 2026 14:55
@adityaalifn adityaalifn disabled auto-merge January 23, 2026 14:55
@adityaalifn adityaalifn merged commit cb9c110 into master Jan 23, 2026
3 of 5 checks passed
@adityaalifn adityaalifn deleted the feature/future-channel-bans branch January 23, 2026 14:55
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