Skip to content

Option to not expose real Telegram Usernames in IRC-messages#444

Open
oliveratgithub wants to merge 5 commits into
RITlug:mainfrom
zorgch:feature/obfuscate-telegram-usernames
Open

Option to not expose real Telegram Usernames in IRC-messages#444
oliveratgithub wants to merge 5 commits into
RITlug:mainfrom
zorgch:feature/obfuscate-telegram-usernames

Conversation

@oliveratgithub
Copy link
Copy Markdown
Contributor

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.

oliveratgithub and others added 5 commits November 12, 2025 23:21
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.
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant