Telegram#

Additional requirement: libc++1.

Slidge uses the official telegram library: tdlib.

usage: slidge --legacy-module slidge.plugins.telegram [-h]
                                                      [--api-hash API_HASH]
                                                      [--api-id API_ID]
                                                      [--attachment-max-size ATTACHMENT_MAX_SIZE]
                                                      [--group-history-maximum-messages GROUP_HISTORY_MAXIMUM_MESSAGES]
                                                      [--outgoing-stickers-regexp OUTGOING_STICKERS_REGEXP]
                                                      [--registration-auth-code-timeout REGISTRATION_AUTH_CODE_TIMEOUT]
                                                      [--tdlib-key TDLIB_KEY]
                                                      [--tdlib-path TDLIB_PATH]

Named Arguments#

--api-hash

Telegram app api_hash, obtained at https://my.telegram.org/apps If you dont set it, users will have to enter their own on registration.

--api-id

Telegram app api_id, obtained at https://my.telegram.org/apps If you dont set it, users will have to enter their own on registration.

--attachment-max-size

Maximum file size (in bytes) to download from telegram automatically/

Default: 10485760

--group-history-maximum-messages

The number of messages to fetch from a group history. These messages and their attachments will be fetched on slidge startup.

Default: 50

--outgoing-stickers-regexp

(workaround until the proper XEP is implemented) Set this to a regexp to treat certain attachments sent from the XMPP client as telegram custom stickers. Example: ‘outgoing-stickers-regexp=.*.webp’ for webp images.

--registration-auth-code-timeout

On registration, users will be prompted for a 2FA code they receive on other telegram clients.

Default: 60

--tdlib-key

Key used to encrypt tdlib persistent DB

Default: “NOT_SECURE”

--tdlib-path

Defaults to ${SLIDGE_HOME_DIR}/tdlib