Jido.Messaging.RoomBinding (Jido Messaging v1.0.0)

Copy Markdown View Source

Represents a binding between an internal room and an external platform room.

Constraints:

  • Unique: {channel, bridge_id, external_room_id} - one internal room per external bridge
  • Non-unique: room_id - one internal room can have many external bindings

Direction

The :direction field controls message flow:

  • :both (default) - Messages flow in both directions
  • :inbound - Only receive messages from external platform
  • :outbound - Only send messages to external platform

Summary

Functions

Create a new RoomBinding with auto-generated ID and timestamp.

Returns the Zoi schema

Types

direction()

@type direction() :: :inbound | :outbound | :both

t()

@type t() :: %Jido.Messaging.RoomBinding{
  bridge_id: binary(),
  channel: atom(),
  direction: atom(),
  enabled: boolean(),
  external_room_id: binary(),
  id: binary(),
  inserted_at: any(),
  room_id: binary()
}

Functions

new(attrs)

Create a new RoomBinding with auto-generated ID and timestamp.

schema()

Returns the Zoi schema