twbridge

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2022 License: Apache-2.0

README

twbridge

This repository contains an implementation of Telegram <-> Whatsapp bridge.
It allows you to receive incoming Whatsapp messages in Telegram chat and reply to them.

How it works

All text messages that you receive in Whatsapp chats are being forwarded to Telegram chat with the bot.
Incoming text messages have the following format:

From: Test User [jid: testuser@gmail.com]
= = = = = = = = = = = =
Message: hello, world!

Reply to a message can be done by simply replying to a specific message.

Requirements

To run this app you need a Telegram bot created, check this manual if you've never done it before.
Once you managed to create it you'll have an API token which will be used to run this app.

Build

Use the following command to build a binary:

make build

Use the following command to build a Docker image:

docker build -t twbridge .

Running

export TELEGRAM_API_TOKEN=<your-telegram-bot-token>; ./twbridge

Testing

Use the following command to run unit-tests and linters:

make tests

Use the following command to run unit-tests only:

make unittests

Use the following command to run golangci-lint:

make golangci-lint

Directories

Path Synopsis
cmd
internal
log

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL