Skip to content

Add a slide with the newest Prodekon tiedotus Telegram post - #70

Merged
lolman420 merged 1 commit into
masterfrom
telegram-slide
Nov 11, 2026
Merged

lolman420 merged 1 commit into
masterfrom
telegram-slide

Conversation

@lolman420

Copy link
Copy Markdown
Contributor

What changed

A new slide shows the newest post on Prodeko's public announcement channel, t.me/prodekotiedotus.

  • server/telegram.ts serves /api/telegram-latest. Public channels have a web preview at t.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 .env change. Cached for 2 minutes. If Telegram changes its markup and no post is found, it answers 204 and the slide hides itself.
  • src/TelegramPost.tsx is 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.
    • Long posts are usually Finnish, then a ___ / ——— / *** line, then English. Only the Finnish part is shown.
    • The text starts at text-5xl and steps down to text-2xl until it fits; if it still doesn't, the end fades out (the QR code opens the whole post).
    • Hidden when the newest post is more than two weeks old.

Checked at 1920×1080 with the channel's current newest post (short), the longest bilingual post (fits at text-3xl after cutting the English part), and the longest post without a separator (fades out at text-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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lolman420
lolman420 merged commit 0f9b771 into master Nov 11, 2026
1 check passed
@lolman420
lolman420 deleted the telegram-slide branch November 11, 2026 23:32
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