Adds option to turn OFF Telegram photo uploads to Imgur (Default: ON)#448
Open
oliveratgithub wants to merge 7 commits intoRITlug:mainfrom
Open
Adds option to turn OFF Telegram photo uploads to Imgur (Default: ON)#448oliveratgithub wants to merge 7 commits intoRITlug:mainfrom
oliveratgithub wants to merge 7 commits intoRITlug:mainfrom
Conversation
* Test fix to for pushing to GHCR * Update circleCI template * docker(build): Updates to `golang:1.25-alpine` * docker-compose(environment): Supports ENV vars Allows building docker image using `docker compose` remotely, and adds support for passable process ENVIRONMENT variables - not failing when no dedicated .env-file is being mapped / available. While it should however retain the backwards-compatibility for still using a .env config file, but ideally using: - a) the CLI argument `--env-file /path/to/.env`, - or b) a `volumes:`-mapping on the docker compose service definition. * circleci: Uses golangci-lint v2.6.1 for `go_1-25` * circleci(go_1-25): Tries to replace codeclimate CodeClimate seems to be no longer existing, «Qlty is from the makers of Code Climate, who built the first cloud-based code quality platform in 2011.»: https://codeclimate.com/blog/code-climate-quality-is-now-qlty-software --------- Co-authored-by: Tim Zabel <tjzabel@protonmail.com>
Allows disabling either bridge to go just "one-way": Telegram → IRC, and IRC → Telegram Each are naturally ENABLED by default, but can be individually be disabled using: - a) the CLI arguments `--noirc` and `--notelegram`, - b) via settings env vars `DISABLE_RELAY_TO_IRC=true` and `DISABLE_RELAY_TO_TELEGRAM=true`
* telegram: Adds option to put IRC nickname in quote Introduces a new optional `QUOTE_NICKNAME=true` setting, that adjusts how IRC messages - particularly the nickname part - are rendered when bridged to Telegram: instead of a whole unformatted string, it uses the supported `<blockquote>`-formatting for the Telegram messages. This results in the sending IRC nickname to be better visible, but also clearly distinguishable from the IRC user's effective Text Message. - Telegram message default behaviour / before: `<ircnick> Hello from IRC to Telegram` - New behaviour and format, if this mode is enabled, will rather look as follows: ``` > <ircnick> Hello from IRC to Telegram ``` For this to work: - the message's parse_mode has to be set to `HTML` - and this requires proper HTML-escaping / HTML-tag removal on the IRC nickname & message parts, before calling the Telegram Bot API sendMessage command. - The StripHTML() func invoked for that, was taken from here: https://go.dev/play/p/fqHzlCJa9ta (L31-35) * irc(messageHandler): Adds also html.EscapeString() + A few Go syntax validation improvements
On Telegram the username is a must-have when creating an account, whereas «First name» (and «Last name») are freely adjustable at any time. By adding a new setting `PREFER_FIRSTNAME=true` it is possible to obfuscate the Telegram user's actual \@usernames - preventing potential leakage of them to IRC channels.
Additional changes: - telegram `stickerHandler`: disabled if existing .env option is `false` - telegram `documentHandler`: - disabled if existing .env option is `false` - also changed the .env option by default to OFF (`false`), following to the docs remark - telegram `locationHandler`: adds Debug log entry if skipped - Updates the relevant User docs
Discards any Messages form non-bridged Telegram Chat IDs the Bot «can read», but are not in scope. Better early prevention to process any arbitrary messages or objects. Allows reusing an existing Telegram Bot, which is connected to multiple Chats. Could also make the last step of the Quick Start Guide «Create bot with BotFather» obsolete / less critical: ~Send /setjoingroups to @Botfather, change to Disable~
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New config setting:
IRC_SEND_PHOTO=true✨ NEW: Optionally disable the Imgur image uploads of all Telegram photos by setting
IRC_SEND_PHOTOtofalse+ Additional changes
stickerHandler: disabled if existing .env option isfalsedocumentHandler:falsefalse), following to the docs remarklocationHandler: adds Debug log entry if skipped