Skip to content

Extract Channel Provider Construction into a Factory#9

Merged
Escoto merged 4 commits intomainfrom
feat/channel-provider-factory
Apr 7, 2026
Merged

Extract Channel Provider Construction into a Factory#9
Escoto merged 4 commits intomainfrom
feat/channel-provider-factory

Conversation

@Escoto
Copy link
Copy Markdown
Owner

@Escoto Escoto commented Apr 7, 2026

Description

Design: ChannelProviderFactory trait

Added a ChannelProviderFactory trait in src/channel/mod.rs with a single create() associated function. Each provider implements it to encapsulate:

  1. Provider-specific config field validation (e.g. WhatsApp's phone_number_id, Slack's app_token)
  2. Temporary provider construction with a dummy SecurityGate
  3. resolve_users() call
  4. Final provider construction with the resolved gate and effective output config

Checklist

@Escoto Escoto self-assigned this Apr 7, 2026
@Escoto Escoto linked an issue Apr 7, 2026 that may be closed by this pull request
@Escoto Escoto merged commit ee15b0b into main Apr 7, 2026
1 check passed
@Escoto Escoto deleted the feat/channel-provider-factory branch April 7, 2026 15:36
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.

Extract Channel Provider Construction into a Factory

1 participant