/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 f474a360d7
commit 5afafc60c4
7 changed files with 215 additions and 10 deletions

View file

@ -50,6 +50,12 @@ func (s *Service) SetAvatarFromExistingPhoto(ctx context.Context, ownerType doma
return photo, nil
}
// PeerHasAvatar reports whether ownerType/ownerID has a current profile photo.
func (s *Service) PeerHasAvatar(ctx context.Context, ownerType domain.PeerType, ownerID int64) (bool, error) {
_, ok, err := s.CurrentProfilePhotoKind(ctx, ownerType, ownerID, domain.ProfilePhotoKindProfile)
return ok, err
}
// photoSourceBytes reads the original image bytes behind a stored photo. Every
// static size of a photo written by putPhotoStaticSizes points at the same
// stored object, so any one size yields the full image.