Skip to content

Channel ABC

Channel

Channel(channel_id)

Bases: ABC

Base class for all channels.

info property

info

Return channel metadata. Override in subclasses.

handle_inbound abstractmethod async

handle_inbound(message, context)

Process an inbound message into a RoomEvent.

deliver abstractmethod async

deliver(event, binding, context)

Deliver an event to this channel.

on_event async

on_event(event, binding, context)

React to an event. Default: no-op for transport channels.

capabilities

capabilities()

Return channel capabilities.

close async

close()

Close the channel and its provider.

extract_text staticmethod

extract_text(event)

Extract plain text from an event's content.