[GH-ISSUE #332] [Bug]: Telegram notification shows raw ** instead of bold title formatting #209

Closed
opened 2026-05-06 12:27:16 +02:00 by BreizhHardware · 8 comments

Originally created by @Sllepper on GitHub (Feb 11, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/332

Originally assigned to: @maziggy on GitHub.

Bug Description

When receiving Telegram notifications from Bambuddy, the message title displays raw asterisks (**) instead of rendering bold text.

For example:

🔷 Print 75% Complete
🟣 Printer Error: Print/Task Error

The ** characters are visible in the message instead of formatting the title as bold.

This affects print progress notifications and printer error notifications.

It looks like Markdown formatting is either:

being wrapped twice (double * added somewhere), or

parse_mode is not enabled in Telegram send_message.

Expected Behavior

The title should render in bold without showing **.

Expected display in Telegram:

🔷 Print 75% Complete
🟣 Printer Error: Print/Task Error

No visible asterisk characters should appear.

Steps to Reproduce

Configure Telegram notifications.

Set title template like:

🔷 Print {progress}% Complete

or

🟣 Printer Error: {error_type}

Trigger a print progress or printer error event.

Observe that Telegram shows:

🔷 Print 75% Complete

instead of bold formatting.

Printer Model

Not printer-related

Bambuddy Version

v0.1.8.1

Printer Firmware Version

new

Installation Method

Manual (git clone)

Operating System

Linux (Ubuntu/Debian)

Relevant Logs / Support Package


Screenshots

Image

Additional Context

Image

Checklist

  • I have searched existing issues to ensure this bug hasn't already been reported
  • I am using the latest version of Bambuddy
  • My printer is set to LAN Only mode
Originally created by @Sllepper on GitHub (Feb 11, 2026). Original GitHub issue: https://github.com/maziggy/bambuddy/issues/332 Originally assigned to: @maziggy on GitHub. ### Bug Description When receiving Telegram notifications from Bambuddy, the message title displays raw asterisks (**) instead of rendering bold text. For example: **🔷 Print 75% Complete** **🟣 Printer Error: Print/Task Error** The ** characters are visible in the message instead of formatting the title as bold. This affects print progress notifications and printer error notifications. It looks like Markdown formatting is either: being wrapped twice (double * added somewhere), or parse_mode is not enabled in Telegram send_message. ### Expected Behavior The title should render in bold without showing **. Expected display in Telegram: 🔷 **Print 75% Complete** 🟣 **Printer Error: Print/Task Error** No visible asterisk characters should appear. ### Steps to Reproduce Configure Telegram notifications. Set title template like: *🔷 Print {progress}% Complete* or *🟣 Printer Error: {error_type}* Trigger a print progress or printer error event. Observe that Telegram shows: **🔷 Print 75% Complete** instead of bold formatting. ### Printer Model Not printer-related ### Bambuddy Version v0.1.8.1 ### Printer Firmware Version new ### Installation Method Manual (git clone) ### Operating System Linux (Ubuntu/Debian) ### Relevant Logs / Support Package ```shell ``` ### Screenshots <img width="603" height="1143" alt="Image" src="https://github.com/user-attachments/assets/f66c7310-b38a-4536-9487-0d95ddfe648e" /> ### Additional Context <img width="583" height="277" alt="Image" src="https://github.com/user-attachments/assets/fba8376b-3238-4619-925c-a8e6f80da122" /> ### Checklist - [x] I have searched existing issues to ensure this bug hasn't already been reported - [ ] I am using the latest version of Bambuddy - [x] My printer is set to LAN Only mode
BreizhHardware 2026-05-06 12:27:16 +02:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@maziggy commented on GitHub (Feb 11, 2026):

This is actually working as intended — Bambuddy automatically wraps the notification title in bold formatting when sending to Telegram. It looks like your custom title templates already include asterisks (🔷 Print {progress}% Complete), which causes the double-wrapping you're seeing.

To fix this, just remove the * from your title templates:

🔷 Print {progress}% Complete
🟣 Printer Error: {error_type}

Bambuddy will add the bold formatting for you automatically.

<!-- gh-comment-id:3882699185 --> @maziggy commented on GitHub (Feb 11, 2026): This is actually working as intended — Bambuddy automatically wraps the notification title in bold formatting when sending to Telegram. It looks like your custom title templates already include asterisks (*🔷 Print {progress}% Complete*), which causes the double-wrapping you're seeing. To fix this, just remove the * from your title templates: 🔷 Print {progress}% Complete 🟣 Printer Error: {error_type} Bambuddy will add the bold formatting for you automatically.
Author
Owner

@Sllepper commented on GitHub (Feb 11, 2026):

if i remove * from title templates it will show like this

Image

*🔷 Print {progress}% Complete*

<!-- gh-comment-id:3883458748 --> @Sllepper commented on GitHub (Feb 11, 2026): if i remove * from title templates it will show like this <img width="655" height="230" alt="Image" src="https://github.com/user-attachments/assets/84957dbe-a96d-4252-a995-97eee45230da" /> `*🔷 Print {progress}% Complete*`
Author
Owner

@Sllepper commented on GitHub (Feb 11, 2026):

Image

<!-- gh-comment-id:3883477532 --> @Sllepper commented on GitHub (Feb 11, 2026): ![Image](https://github.com/user-attachments/assets/0acfd688-93ef-453f-a79c-e80d792937fa)
Author
Owner

@maziggy commented on GitHub (Feb 11, 2026):

Then it's perhaps the colored dot. Don't know. I'm using Telegram and don't have any issues.

<!-- gh-comment-id:3883525555 --> @maziggy commented on GitHub (Feb 11, 2026): Then it's perhaps the colored dot. Don't know. I'm using Telegram and don't have any issues.
Author
Owner

@Sllepper commented on GitHub (Feb 11, 2026):

I did some additional testing and noticed a pattern.

If the notification body does NOT contain underscores (_), the bold formatting works correctly and the title is displayed properly in Telegram.

However, if the body contains underscores — for example:

  • Job name: Bambu A1_plate_8
  • Error code: 0300_0001

then sometimes the notification appears with literal asterisks (*Title*) instead of rendering bold formatting.

It seems the issue is related to Markdown parsing being skipped or broken when underscores are present in the body.

You can see in the screenshots:

  • Notifications without underscores render bold correctly.
  • Notifications with underscores sometimes show the asterisks visibly.

I'm not sure if this is caused by Markdown parsing behavior or conditional parse_mode logic in the code, but I consistently observe this behavior on my setup.

I'm using Telegram mobile and desktop, and I can reproduce it reliably.

I tried modifying the formatting logic but haven't found a clean solution yet.

Please let me know if you’re able to reproduce this or if there’s a recommended way to handle underscores safely.

Image
Image

<!-- gh-comment-id:3885900497 --> @Sllepper commented on GitHub (Feb 11, 2026): I did some additional testing and noticed a pattern. If the notification body does NOT contain underscores (`_`), the bold formatting works correctly and the title is displayed properly in Telegram. However, if the body contains underscores — for example: - Job name: Bambu A1_plate_8 - Error code: 0300_0001 then sometimes the notification appears with literal asterisks (`*Title*`) instead of rendering bold formatting. It seems the issue is related to Markdown parsing being skipped or broken when underscores are present in the body. You can see in the screenshots: - Notifications without underscores render bold correctly. - Notifications with underscores sometimes show the asterisks visibly. I'm not sure if this is caused by Markdown parsing behavior or conditional parse_mode logic in the code, but I consistently observe this behavior on my setup. I'm using Telegram mobile and desktop, and I can reproduce it reliably. I tried modifying the formatting logic but haven't found a clean solution yet. Please let me know if you’re able to reproduce this or if there’s a recommended way to handle underscores safely. ![Image](https://github.com/user-attachments/assets/1d2b33b6-adcf-4f7c-b2f2-09c5f7b51a08) ![Image](https://github.com/user-attachments/assets/53b9ae8a-6673-4955-ae98-cf3528f61cca)
Author
Owner

@maziggy commented on GitHub (Feb 12, 2026):

Good catch! Fix in branch 0.2.0b.


If you find Bambuddy useful, please consider giving it a on GitHub — it helps others discover the project!

<!-- gh-comment-id:3888927915 --> @maziggy commented on GitHub (Feb 12, 2026): Good catch! Fix in branch 0.2.0b. ----- If you find Bambuddy useful, please consider giving it a ⭐ on [GitHub](https://github.com/bambuman/bambuddy) — it helps others discover the project!
Author
Owner

@Sllepper commented on GitHub (Feb 12, 2026):

Thanks for the quick fix!

<!-- gh-comment-id:3890386319 --> @Sllepper commented on GitHub (Feb 12, 2026): Thanks for the quick fix!
Author
Owner

@maziggy commented on GitHub (Feb 12, 2026):

Not within the next days.

<!-- gh-comment-id:3890394311 --> @maziggy commented on GitHub (Feb 12, 2026): Not within the next days.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bambuddy#209
No description provided.