pub struct ChannelView {
pub account: Option<String>,
pub account_label: Option<String>,
pub capabilities: Option<Box<Capabilities>>,
pub connected: Option<bool>,
pub dm_policy: Option<String>,
pub group_policy: Option<String>,
pub id: Option<String>,
pub pending_pairing: Option<i32>,
}Fields§
§account: Option<String>Account is the id-shaped fact about that connection: the lowercased external id integrations custodies for it — a Discord guild id, a Slack team (workspace) id, a Teams AAD tenant id, or the Telegram chat the org bound. Empty when not connected. Informational: the access policy keys on (org, channel), so exactly one account is representable per pair.
account_label: Option<String>AccountLabel is the human label of that same account — the Discord guild name, the Slack team name, the Teams tenant name (falling back to the tenant id), the Telegram chat title. DISPLAY ONLY: never a key, and never swapped with Account, on any surface.
capabilities: Option<Box<Capabilities>>Capabilities is what this transport renders natively — read it before composing a message that needs threading, media or interactive actions.
connected: Option<bool>Connected is whether integrations holds a connection for (this org, this transport) — whether someone finished its connect flow. False leaves Account and AccountLabel empty, and a send is then refused downstream rather than here: by the transport’s own binding check (403 for a Telegram chat this org has not bound, 409 for a Discord or Teams room with no inbound-learned route), or on Slack by the absent per-org bot token, which surfaces as 502.
dm_policy: Option<String>DMPolicy is how this org admits direct messages here: "pairing", "allowlist" or "open", defaulting to "pairing" when the org has never set one.
group_policy: Option<String>GroupPolicy is how this org admits group and thread rooms here: "open", "allowlist" or "disabled", defaulting to "open". Both policy fields come back EMPTY — rather than the listing failing — when the policy cannot be read; GET /v1/channels/allowlist carries the same two with the entries they consult.
id: Option<String>ID is the fixed transport identifier — discord, slack, teams, telegram or whatsapp — and the value every route on this surface names a channel by, including the :channel segment of the send path. The listing is always in that order.
pending_pairing: Option<i32>PendingPairing counts the org’s UNEXPIRED pairing requests on this channel: exactly the rows GET /v1/channels/pairing returns for it, one per person waiting on an admin. It never exceeds three — the pending cap per (org, channel) — and expired requests are not counted.
Implementations§
Source§impl ChannelView
impl ChannelView
pub fn new() -> ChannelView
Trait Implementations§
Source§impl Clone for ChannelView
impl Clone for ChannelView
Source§fn clone(&self) -> ChannelView
fn clone(&self) -> ChannelView
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more