Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(telegram): update docs and generator for private channels #250

Merged
merged 4 commits into from May 27, 2022

Conversation

piksel
Copy link
Member

@piksel piksel commented May 25, 2022

The current docs regarding telegram channel names only applies to public channels. Addressing private channels is not possible using the described @channelname syntax.
This PR fixes the documentation regarding this, and makes the telegram generator display private channels correctly (instead of just calling them @).

Fixes #249

@piksel piksel added the Service: Telegram Related to the Telegram Service label May 25, 2022
@codecov
Copy link

codecov bot commented May 25, 2022

Codecov Report

Merging #250 (8a2f7bb) into main (468d552) will increase coverage by 0.11%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #250      +/-   ##
==========================================
+ Coverage   77.73%   77.85%   +0.11%     
==========================================
  Files          96       96              
  Lines        2866     2877      +11     
==========================================
+ Hits         2228     2240      +12     
+ Misses        468      466       -2     
- Partials      170      171       +1     
Impacted Files Coverage Δ
pkg/services/telegram/telegram_generator.go 78.04% <100.00%> (+3.40%) ⬆️
pkg/services/telegram/telegram_json.go 94.44% <100.00%> (+5.55%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 468d552...8a2f7bb. Read the comment docs.

@JosephKav
Copy link
Contributor

I'd still recommend the forward message to 'JSON Dump Bot' method to get the chat ID. Doesn't require a PC/Docker compared to docker run --rm -it containrrr/shoutrrr generate telegram
Up to you though of course

@piksel
Copy link
Member Author

piksel commented May 25, 2022

@JosephKav Yeah, good point. My main concern is that it's a third party bot that is out of our control regarding what it's actually doing.
It's also not very user friendly.

Shoutrrr CLI works fine outside of docker and even runs on android. The only reason for recommending the docker way is that it's a single line to download, run and remove the CLI in one go (and it's always updated).
It's also possible to run the generator in the browser:
https://wasmcli.p1k.se/
But it's in alpha stage still... (it's also running a much older shoutrrr version here). Ideally it would be deployed with the docs sometime in the future...

@piksel piksel force-pushed the fix/telegram-private-channels branch from fda0238 to d5ea223 Compare May 25, 2022 14:41
@piksel
Copy link
Member Author

piksel commented May 25, 2022

@JosephKav I added another section, but replaced @JsonDumpBot with @UserInfoBot, which is made by the same author. It's slightly easier to use, but provides the same information.

@piksel
Copy link
Member Author

piksel commented May 27, 2022

Since neither @JsonDumpBot, nor @UserInfoBot could help getting the Chat ID for group chats, I wrote a bot specifically for this purpose. It can be reached at @shoutrrrbot. Updated the docs to point to it instead.

@piksel piksel merged commit a9246af into main May 27, 2022
@piksel piksel deleted the fix/telegram-private-channels branch May 27, 2022 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Service: Telegram Related to the Telegram Service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Telegram private channels cannot be used with @-prefix syntax
2 participants