feat(tl): updated to 174 layer

This commit is contained in:
alina 🌸 2024-02-19 20:37:36 +03:00
parent 80850c9ad5
commit 8460cc3ade
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI
6 changed files with 16 additions and 9 deletions

View file

@ -7,7 +7,7 @@ import { MtMessageNotFoundError } from '../../types/errors.js'
import { Message } from '../../types/messages/message.js'
import { TextWithEntities } from '../../types/misc/entities.js'
import { InputPeerLike } from '../../types/peers/index.js'
import { normalizeDate, normalizeMessageId, toInputUser } from '../../utils/index.js'
import { normalizeDate, normalizeMessageId } from '../../utils/index.js'
import { _getPeerChainId } from '../misc/chain-id.js'
import { _normalizeInputText } from '../misc/normalize-text.js'
import { resolvePeer } from '../users/resolve-peer.js'
@ -156,7 +156,7 @@ export async function _processCommonSendParameters(
tlReplyTo = {
_: 'inputReplyToStory',
storyId: params.replyToStory,
userId: toInputUser(peer),
peer,
}
}

View file

@ -393,6 +393,13 @@ export interface ActionWallpaperChanged {
*/
same: boolean
/**
* Whether the wallpaper was forcefully applied for
* both sides, without explicit confirmation from the other
* side.
*/
forBoth: boolean
/** TL object representing the new wallpaper */
wallpaper: tl.TypeWallPaper
}
@ -660,10 +667,10 @@ export function _messageActionFromTl(this: Message, act: tl.TypeMessageAction):
peers: act.peers.map((it) => parsePeer(it, this._peers)),
}
case 'messageActionSetChatWallPaper':
case 'messageActionSetSameChatWallPaper':
return {
type: 'wallpaper_changed',
same: act._ === 'messageActionSetSameChatWallPaper',
same: act.same!,
forBoth: act.forBoth!,
wallpaper: act.wallpaper,
}
default:

View file

@ -594,7 +594,7 @@ export class UpdatesManager {
if (msg.replyTo._ === 'messageReplyHeader' && !(await fetchPeer(msg.replyTo.replyToPeerId))) {
return missing
}
if (msg.replyTo._ === 'messageReplyStoryHeader' && !(await fetchPeer(msg.replyTo.userId))) {
if (msg.replyTo._ === 'messageReplyStoryHeader' && !(await fetchPeer(msg.replyTo.peer))) {
return missing
}
}
@ -746,7 +746,7 @@ export class UpdatesManager {
store(msg.replyTo.replyFrom?.fromId)
break
case 'messageReplyStoryHeader':
store(msg.replyTo.userId)
store(msg.replyTo.peer)
break
}
// in fact, we can also use peers contained in the replied-to message,

View file

@ -2,7 +2,7 @@
TL schema and related utils used for mtcute.
Generated from TL layer **173** (last updated on 04.02.2024).
Generated from TL layer **174** (last updated on 19.02.2024).
## About

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
{
"name": "@mtcute/tl",
"version": "173.0.0",
"version": "174.0.0",
"description": "TL schema used for mtcute",
"main": "index.js",
"author": "Alina Sireneva <alina@tei.su>",