Bridge messages between platforms

Use chatom.MessageBridge to forward messages while translating formatting, channel IDs, attachments, attribution, and linked user mentions.

Map channels and forward

from chatom import MessageBridge

bridge = MessageBridge(
    source=slack_backend,
    dest=symphony_backend,
    source_name="slack",
    dest_name="symphony",
    identity_mapper=mapper,
    channels={"C0123": "symphony-stream-id"},
)

forwarded = await bridge.forward(incoming_message)

Pass to_channel to override the channel map for one call:

forwarded = await bridge.forward(
    incoming_message,
    to_channel="incident-room-id",
    include_attachments=False,
)

Use chatom.MessageBridge.forward_many() when an ordered batch should use the same destination rules.