Sign inSign up

lattenwald/tgas

By lattenwald

Updated almost 4 years ago

Telegram antispam client

Image
0

653

lattenwald/tgas repository overview

Repository

https://github.com/lattenwald/tgas

Configuration

Obtain api details (api_id and api_hash) at https://my.telegram.org.

Create config.toml file with folliowing content:

[tgas]
# optional, remove/comment this if not needed
# if present, all spam messages will be forwarded here along with sender info
# spam_chat = -10014630656431

[tdlib]
# obtain your api_id and api_hash at https://my.telegram.org/auth
api_id = "xxxxx"
api_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Mount points

This image has following mount points:

  1. /app/db — tdlib database, including but not limited to authorization data
  2. /app/config.toml — your configuration
  3. /app/erl_crash.dump — crash dump if needed (optional)
  4. /app/log — some logs (optional)

First run, authorization

docker run \
  -v `pwd`/config.toml:/app/config.toml \
  -v `pwd`/db:/app/db \
  -i -t lattenwald/tgas \
  start_iex

You need to authorize

iex> :tdlib.phone_number :tgas, "+12345678"
iex> :tdlib.auth_code :tgas, "23456"
iex> :tdlib.auth_password :tgas, "yourPassword"

You can also list your chats here, to find chat id for forwarding spam messages

iex> Tgas.Session.getChats

... or find some specific chat by title, using regular expression

iex> Tgas.Session.findChat ~r/secret group/i

Running

docker run \
  -v `pwd`/config.toml:/app/config.toml \
  -v `pwd`/db:/app/db \
  -i -t lattenwald/tgas

Tag summary

Content type

Image

Digest

sha256:95a60cee8

Size

131.1 MB

Last updated

almost 4 years ago

docker pull lattenwald/tgas