chore(client)!: some MessageMedia fixes

breaking: `WebPage#type`: `web_page` -> `webpage` for consistency
This commit is contained in:
alina 🌸 2023-12-02 07:26:35 +03:00
parent e9d6cfc39d
commit af34f1e5ca
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI
3 changed files with 3 additions and 3 deletions

View file

@ -65,7 +65,7 @@ export async function sendCopy(
throw new MtArgumentError("Service messages can't be copied")
}
if (msg.media && msg.media.type !== 'web_page' && msg.media.type !== 'invoice') {
if (msg.media && msg.media.type !== 'webpage' && msg.media.type !== 'invoice') {
let caption: InputText | undefined = params.caption
if (!caption) {

View file

@ -9,7 +9,7 @@ import { Thumbnail } from './thumbnail.js'
* A photo
*/
export class Photo extends FileLocation {
readonly type: 'photo'
readonly type = 'photo' as const
/** Biggest available photo width */
readonly width: number

View file

@ -17,7 +17,7 @@ import { Photo } from './photo.js'
* of my own observations and experiments.
*/
export class WebPage {
readonly type = 'web_page' as const
readonly type = 'webpage' as const
constructor(readonly raw: tl.RawWebPage) {}