Skip to content

feat: added message from bot#163

Merged
hmbanan666 merged 1 commit into
mainfrom
added-message-with-id
Sep 16, 2025
Merged

feat: added message from bot#163
hmbanan666 merged 1 commit into
mainfrom
added-message-with-id

Conversation

@hmbanan666
Copy link
Copy Markdown
Collaborator

@hmbanan666 hmbanan666 commented Sep 16, 2025

Summary by CodeRabbit

  • New Features
    • When you send a photo via Telegram, you now receive an immediate reply confirming the ticket ID for that photo.
  • Changes
    • The previous acknowledgment message (“Photo has been forwarded to support.”) is no longer sent; the ticket ID reply replaces it.

@hmbanan666 hmbanan666 self-assigned this Sep 16, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Sep 16, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Updates handlePhoto to send a ticket ID reply to the user, then forward both that reply and the original photo to TELEGRAM_FILES_GROUP_ID using a batched forwardMessages call. Removes the previous final acknowledgment message. Other logic, including logging, upload, and ticket creation, is unchanged.

Changes

Cohort / File(s) Change Summary
Telegram bot photo handling
apps/web-app/server/services/telegram/wasabi-bot.ts
Replaced single forwardMessage with: (1) send a user-facing reply containing ticket ID; (2) forward an array of message IDs (reply + original photo) to TELEGRAM_FILES_GROUP_ID via forwardMessages; removed the prior final acknowledgment message; retained existing logging, storage upload, and ticket-message creation.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant U as User (Telegram)
  participant B as WasabiBot
  participant TG as Telegram API
  participant G as Files Group

  Note over U,B: handlePhoto flow (updated)
  U->>B: Send photo
  B->>TG: sendMessage(reply with ticket ID)
  TG-->>B: replyMessageId
  B->>TG: forwardMessages([replyMessageId, photoMessageId], to=G)
  TG-->>G: Deliver forwarded messages
  Note over B: Continue existing steps (logging, upload, ticket creation)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • fix: upload to storage #161 — Alters handlePhoto download/upload handling in the same file, likely adjacent to the reply/forward flow updated here.

Poem

A ticket blooms from a snapshot’s gleam,
I thump the keys—a tidy little stream.
First a note, then messages two,
Hopped to the group, tidy and new.
Ears perked high, I forward with delight—
Support gets the crumbs, and all is right. 🐇✨

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch added-message-with-id

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e42dd98 and caeb199.

📒 Files selected for processing (1)
  • apps/web-app/server/services/telegram/wasabi-bot.ts (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@hmbanan666 hmbanan666 merged commit a8d4c6f into main Sep 16, 2025
5 of 6 checks passed
@sonarqubecloud
Copy link
Copy Markdown

@hmbanan666 hmbanan666 deleted the added-message-with-id branch September 16, 2025 14:57
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