directmedia: fix panic if url preview has no photo

This commit is contained in:
Tulir Asokan
2026-03-11 01:21:55 +02:00
parent a9cb55d109
commit 29000146ba
+1 -1
View File
@@ -175,7 +175,7 @@ func (tc *TelegramConnector) Download(ctx context.Context, mediaID networkid.Med
Msg("downloading webpage photo")
readyTransferer = transferer.WithPhoto(pc)
} else {
return nil, fmt.Errorf("not a photo: %T", pc.TypeName())
return nil, fmt.Errorf("no photo found in webpage item")
}
default:
return nil, fmt.Errorf("unhandled media type %T", msgMedia)