1 stable release

Uses new Rust 2024

1.3.1 Dec 16, 2025

#419 in HTTP server

MIT license

42KB
911 lines

brib

  • A tool to sync messages between messaging apps bi-directionally

  • Current Support

    1. Telegram
    2. Slack

Pre Run

Telegram

  • TELEGRAM_BOT_TOKEN
    1. Create a bot from @BotFather
    2. Obtain the Bot Token from BotFather
  • TELEGRAM_CHANNEL_ID
    1. Create a channel
    2. Add created bot to the channel and make it as Admin
    3. Login Telegram Web and go to the channel. Obtain the Channel ID from the URL. (example: -100xxx)

Slack

  • SLACK_BOT_TOKEN
    1. Go to https://api.slack.com/apps
    2. "Create New App" -> "From scratch"
    3. Give App name and select workspace
    4. Go to "OAuth & Permissions"
    5. Add following Bot Token Scopes. NOTE: Some of the permissions are not-necessary.
      • channels:history (to read messages from public channels)
      • channels:write.invites
      • channels:write.topic
      • chat:write
      • chat:write.customize
      • chat:write.public
      • files:read
      • files:write
      • groups:history (if using private channels)
      • users.profile:read
      • users:read (for reading user info in workspace to use in forwarding message)
    6. Install the app to your workspace
    7. Copy the "Bot User OAuth Token" (starts with xoxb-)
  • SLACK_CHANNEL_ID
    1. Open Slack in a web browser
    2. Navigate to the channel you want to post to
    3. The channel ID is in the URL: https://app.slack.com/client/T.../C123456789
    4. The part after the last / (starting with C) is your channel ID

Run

fly.io

  • configure example.fly.toml with necessary values
  • create a App using fly launch --no-deploy
  • set secrets using fly secrets set KEY=VALUE command, same as .env
  • deploy using fly deploy command and use same command in consecutive runs

Post Run

Slack configuration

  • Navigate to "Event Subscriptions" and enable events:
    1. Set Request URL to your server: https://your-domain.com/slack/events
    2. Subscribe to bot events: message.channels (or message.groups for private channels)
    3. Save changes

Reference

Slack


Repo Structure

Dependencies

~36–56MB
~1M SLoC