Repository navigation
Add a slide with the newest Prodekon tiedotus Telegram post - #70
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What changed
A new slide shows the newest post on Prodeko's public announcement channel, t.me/prodekotiedotus.
server/telegram.tsserves/api/telegram-latest. Public channels have a web preview att.me/s/<channel>, so this reads that page on the server and takes the newest post that has text: its text, time, link and photo, if any. No bot, no key, no.envchange. Cached for 2 minutes. If Telegram changes its markup and no post is found, it answers 204 and the slide hides itself.src/TelegramPost.tsxis the slide: the heading "Prodekon tiedotus", when it was posted, the text, the photo if there is one, and a QR code to the post.___/———/***line, then English. Only the Finnish part is shown.text-5xland steps down totext-2xluntil it fits; if it still doesn't, the end fades out (the QR code opens the whole post).Checked at 1920×1080 with the channel's current newest post (short), the longest bilingual post (fits at
text-3xlafter cutting the English part), and the longest post without a separator (fades out attext-2xl).Note: master shows only the bämskit slide until 17.11, so this slide appears in the rotation after that.
🤖 Generated with Claude Code