Skip to content

Releases: Napuu/gpsp-bot

Release 20260417112836

Choose a tag to compare

@github-actions github-actions released this 17 Apr 11:30
41d4515
feat(stats): suppress link previews on /stats response (#28)

The /stats leaderboard embeds each video's source URL, so Telegram auto-
previewed the first URL and Discord auto-embedded all of them, dwarfing the
actual ranking. Add a disableWebPreview flag on Context, set it in
StatsHandler, and honor it in TextResponseHandler via
tele.SendOptions.DisableWebPagePreview on Telegram and
discordgo.MessageFlagsSuppressEmbeds on Discord.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>

Release 20260417074651

Choose a tag to compare

@github-actions github-actions released this 17 Apr 07:48
5b47866
feat(telereactions): extract Telegram message_reaction dispatch (#27)

telebot v4 exposes MessageReaction update fields but does not route them to a
Handle() endpoint, so telegram_api.go inlined a MiddlewarePoller filter that
diffed OldReaction/NewReaction. Move that logic into internal/telereactions
so the platform glue only wires callbacks to DB updates, and add unit tests
for the diff against synthetic tele.Update fixtures.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>

Release 20260416211237

Choose a tag to compare

@github-actions github-actions released this 16 Apr 21:14
Fix reaction counts by opening a fresh DB connection per reaction event

DuckDB snapshot isolation caused the long-lived statsDB connection (opened
at bot startup) to be blind to rows inserted later by VideoStatsHandler's
separate short-lived connections. Every UpdateReactionCount call matched 0
rows because the target video_stats row did not exist in statsDB's snapshot.

Fix by opening a fresh connection per message_reaction update, matching the
pattern used by VideoStatsHandler and other DB callers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Release 20260416205151

Choose a tag to compare

@github-actions github-actions released this 16 Apr 20:54
ci

Release 20260416191516

Choose a tag to compare

@github-actions github-actions released this 16 Apr 19:17
Fix reaction counts not updating due to emoji parameter binding issue

Move emoji-to-column mapping from DuckDB CASE WHEN expressions to Go,
avoiding potential parameter binding mismatch with emoji string literals.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Release 20260415123854

Choose a tag to compare

@github-actions github-actions released this 15 Apr 12:41
Initialize stats DB before opening it on platform startup

OpenStatsDB fails on fresh deploys because the DB file doesn't exist
yet. Call InitRepostDB first to create the directory and schema.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Release 20260415121211

Choose a tag to compare

@github-actions github-actions released this 15 Apr 12:15
cae6ce7
Add /stats command with video poster and reaction tracking (#25)

* Add /stats command with video poster and reaction tracking

Tracks who posts videos via /dl and how many reactions (including per-emoji
👍/👎) those posts receive. Surfaces data via a new /stats command showing
top posters, most liked/disliked videos, and top reposters per group.

- Extend DuckDB schema with video_stats table (thumbs_up/down counts, is_repost flag)
- New VideoStatsHandler records each successful /dl post including repost detection
- New StatsHandler responds to /stats with a per-group leaderboard
- Telegram: MiddlewarePoller intercepts message_reaction updates and diffs
  old/new emoji arrays to update per-emoji counts accurately
- Discord: reaction add/remove event listeners with emoji routing
- Fix ConstructTextResponseHandler overwriting textResponse for Stats action
- Fix EndOfChainHandler calling CleanupOldFingerprints before DB is initialised

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Address PR #25 review feedback

- Add allowlist check in queryTopByReactionColumn to defuse SQL injection risk
- Group leaderboard/reposter stats by user_id only, picking MAX(username) so
  a renamed user is counted as one person instead of splitting into two rows
- Drop unused reaction_count column; leaderboards already use the per-emoji
  counts so the total was dead weight
- Comment the ALTER TABLE migration block to explain why it duplicates the
  CREATE TABLE columns (needed for existing DBs created before these columns)
- StatsHandler, Discord and Telegram reaction tracking now share a single
  *sql.DB instead of opening a new DuckDB connection per event/query
- Add default case to the platform switches in StatsHandler and
  VideoStatsHandler so unknown services log and bail instead of building a
  malformed group_id

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

Release 20260309171111

Choose a tag to compare

@github-actions github-actions released this 09 Mar 17:14
5fc47c0
Fix /euribor not posting rate values with graph (#24)

* Initial plan

* Fix /euribor message: move constructTextResponseHandler before imageResponseHandler in chain

Co-authored-by: Napuu <15855436+Napuu@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Napuu <15855436+Napuu@users.noreply.github.com>

Release 20260226204306

Choose a tag to compare

@github-actions github-actions released this 26 Feb 20:45
5bee854
Add yt-dlp and ffmpeg versions to version output (#23)

* Initial plan

* Add yt-dlp and ffmpeg versions to version output

Co-authored-by: Napuu <15855436+Napuu@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Napuu <15855436+Napuu@users.noreply.github.com>

Release 20260226202916

Choose a tag to compare

@github-actions github-actions released this 26 Feb 20:32
a0f4b26
Fix grammatically incorrect Finnish negations in /tuplilla responses …