/mybots: Edit Bot summary screen, return-to-menu, clickable @mentions

- Edit Bot now shows the current value of every field (Name/About/
  Description/Botpic/Commands) like BotFather, with real botpic status
  via a new PeerHasAvatar port method.
- After editing a field the dialog lands back on a fresh Edit Bot menu
  (working "Back to bot" / "Bots list" buttons) instead of ending, so a
  follow-up button press no longer reports the button as expired.
- Service-bot messages now render @username as a tappable mention entity.
This commit is contained in:
Astra 2026-09-08 13:44:01 +01:00
parent 165f81414c
commit 8bc54fbfc5
7 changed files with 215 additions and 10 deletions

View file

@ -678,6 +678,11 @@ func (s *Service) handleSetValue(ctx context.Context, state domain.BotChatState,
}
return reply
}
if state.Draft[mybotsDraftReturn] == "1" {
// Opened from the /mybots menu: land back on the Edit Bot menu (fresh
// message, working buttons) rather than ending the dialog.
return s.myBotsReturnToEditMenu(ctx, state.UserID, botID, state.Draft[mybotsDraftPage], reply.Text)
}
s.clearState(ctx, state.UserID)
return reply
}