From 8cc7b09716d0ea511c19e4f57a8d1cc4a5e4c24b Mon Sep 17 00:00:00 2001
From: shokollm <270575765+shokollm@users.noreply.github.com>
Date: Sun, 5 Apr 2026 01:39:29 +0000
Subject: [PATCH] fix: only show user in /show if username is stored
Now only shows the creator line if created_by_username exists,
no fallback to "User {id}" which could be confusing.
---
apps/telegram-bot/commands.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/apps/telegram-bot/commands.py b/apps/telegram-bot/commands.py
index 0739dae..b13f56b 100644
--- a/apps/telegram-bot/commands.py
+++ b/apps/telegram-bot/commands.py
@@ -666,10 +666,10 @@ async def cmd_show(update: Update, ctx: ContextTypes.DEFAULT_TYPE) -> None:
due_str = dt_due.strftime("%d %B %Y %H:%M")
lines.append(f"📅 {due_str} ({timezone_str})")
- display_name = bounty.created_by_username or f"User {bounty.created_by_user_id}"
- lines.append(
- f'👤 {display_name}'
- )
+ if bounty.created_by_username:
+ lines.append(
+ f'👤 {bounty.created_by_username}'
+ )
dt_created = datetime.fromtimestamp(bounty.created_at, tz=tz)
created_str = dt_created.strftime("%Y-%m-%d %H:%M")