Channels
matrix
matrix homeserver integration
setup
[channels_config.matrix]
homeserver = "https://matrix.org"
access_token = "enc2:..."
allowed_rooms = ["!abc:matrix.org"]
getting an access token
curl -X POST https://matrix.org/_matrix/client/r0/login \
-H "Content-Type: application/json" \
-d '{"type": "m.login.password", "user": "@bot:matrix.org", "password": "..."}'
how it works
baihu syncs with the homeserver using the matrix client-server API. it polls for new events, processes messages, and sends responses. transaction IDs use the bh_ prefix to prevent duplicate sends.