diff --git a/packages/client/src/types/media/photo.ts b/packages/client/src/types/media/photo.ts index a1745fd0..912418ce 100644 --- a/packages/client/src/types/media/photo.ts +++ b/packages/client/src/types/media/photo.ts @@ -156,6 +156,18 @@ export class Photo extends FileLocation { return this._uniqueFileId } + /** + * Input photo generated from this object. + */ + get inputPhoto(): tl.TypeInputPhoto { + return { + _: 'inputPhoto', + id: this.raw.id, + accessHash: this.raw.accessHash, + fileReference: this.raw.fileReference, + } + } + /** * Input media generated from this object, * to be used in {@link InputMediaLike} and @@ -164,12 +176,7 @@ export class Photo extends FileLocation { get inputMedia(): tl.TypeInputMedia { return { _: 'inputMediaPhoto', - id: { - _: 'inputPhoto', - id: this.raw.id, - accessHash: this.raw.accessHash, - fileReference: this.raw.fileReference, - }, + id: this.inputPhoto } } }