feat(tl): updated to layer 184
This commit is contained in:
parent
a110ad2ce7
commit
0ebd305797
5 changed files with 39 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
||||||
import { tl } from '@mtcute/tl'
|
import { tl } from '@mtcute/tl'
|
||||||
|
|
||||||
|
import { getMarkedPeerId } from '../../../utils/peer-utils.js'
|
||||||
import { _callDiscardReasonFromTl, CallDiscardReason } from '../calls/index.js'
|
import { _callDiscardReasonFromTl, CallDiscardReason } from '../calls/index.js'
|
||||||
import { Photo } from '../media/photo.js'
|
import { Photo } from '../media/photo.js'
|
||||||
import { parsePeer, Peer } from '../peers/peer.js'
|
import { parsePeer, Peer } from '../peers/peer.js'
|
||||||
|
@ -453,6 +454,26 @@ export interface ActionBoostApply {
|
||||||
count: number
|
count: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** A payment was refunded */
|
||||||
|
export interface ActionPaymentRefunded {
|
||||||
|
readonly type: 'payment_refunded'
|
||||||
|
|
||||||
|
/** Three-letter ISO 4217 currency code */
|
||||||
|
currency: string
|
||||||
|
|
||||||
|
/** Marked ID of the peer where the stars were refunded (?) */
|
||||||
|
peerId: number
|
||||||
|
|
||||||
|
/** Number of `currency` refunded, in the smallest unit */
|
||||||
|
amount: tl.Long
|
||||||
|
|
||||||
|
/** Payload defined by the bot */
|
||||||
|
payload?: Uint8Array
|
||||||
|
|
||||||
|
/** Information about the charge */
|
||||||
|
charge: tl.TypePaymentCharge
|
||||||
|
}
|
||||||
|
|
||||||
export type MessageAction =
|
export type MessageAction =
|
||||||
| ActionChatCreated
|
| ActionChatCreated
|
||||||
| ActionChannelCreated
|
| ActionChannelCreated
|
||||||
|
@ -496,6 +517,7 @@ export type MessageAction =
|
||||||
| ActionGiveawayStarted
|
| ActionGiveawayStarted
|
||||||
| ActionGiveawayEnded
|
| ActionGiveawayEnded
|
||||||
| ActionBoostApply
|
| ActionBoostApply
|
||||||
|
| ActionPaymentRefunded
|
||||||
| null
|
| null
|
||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
|
@ -753,6 +775,15 @@ export function _messageActionFromTl(this: Message, act: tl.TypeMessageAction):
|
||||||
type: 'boost_apply',
|
type: 'boost_apply',
|
||||||
count: act.boosts,
|
count: act.boosts,
|
||||||
}
|
}
|
||||||
|
case 'messageActionPaymentRefunded':
|
||||||
|
return {
|
||||||
|
type: 'payment_refunded',
|
||||||
|
currency: act.currency,
|
||||||
|
peerId: getMarkedPeerId(act.peer),
|
||||||
|
amount: act.totalAmount,
|
||||||
|
payload: act.payload,
|
||||||
|
charge: act.charge,
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,6 +195,11 @@ export class FullChat extends Chat {
|
||||||
return this.fullPeer?.boostsUnrestrict ?? 0
|
return this.fullPeer?.boostsUnrestrict ?? 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Whether the current user can view Telegram Stars revenue for this chat */
|
||||||
|
get canViewStarsRevenue(): boolean {
|
||||||
|
return this.fullPeer._ === 'channelFull' && this.fullPeer.canViewStats!
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Chat members count, for groups, supergroups and channels only.
|
* Chat members count, for groups, supergroups and channels only.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
TL schema and related utils used for mtcute.
|
TL schema and related utils used for mtcute.
|
||||||
|
|
||||||
Generated from TL layer **183** (last updated on 30.06.2024).
|
Generated from TL layer **184** (last updated on 08.07.2024).
|
||||||
|
|
||||||
## About
|
## About
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@mtcute/tl",
|
"name": "@mtcute/tl",
|
||||||
"version": "183.0.0",
|
"version": "184.0.0",
|
||||||
"description": "TL schema used for mtcute",
|
"description": "TL schema used for mtcute",
|
||||||
"author": "alina sireneva <alina@tei.su>",
|
"author": "alina sireneva <alina@tei.su>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
Loading…
Reference in a new issue