feat(client): inputPhoto getter for Photo
This commit is contained in:
parent
23bc4b5e30
commit
14d2f9ff08
1 changed files with 13 additions and 6 deletions
|
@ -156,6 +156,18 @@ export class Photo extends FileLocation {
|
||||||
return this._uniqueFileId
|
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,
|
* Input media generated from this object,
|
||||||
* to be used in {@link InputMediaLike} and
|
* to be used in {@link InputMediaLike} and
|
||||||
|
@ -164,12 +176,7 @@ export class Photo extends FileLocation {
|
||||||
get inputMedia(): tl.TypeInputMedia {
|
get inputMedia(): tl.TypeInputMedia {
|
||||||
return {
|
return {
|
||||||
_: 'inputMediaPhoto',
|
_: 'inputMediaPhoto',
|
||||||
id: {
|
id: this.inputPhoto
|
||||||
_: 'inputPhoto',
|
|
||||||
id: this.raw.id,
|
|
||||||
accessHash: this.raw.accessHash,
|
|
||||||
fileReference: this.raw.fileReference,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue