feat!: updated to layer 195
This commit is contained in:
parent
5379f023b8
commit
e08afd6caa
8 changed files with 19 additions and 12 deletions
|
@ -337,7 +337,7 @@ export class FullChat extends Chat {
|
||||||
get recentRequesters(): User[] {
|
get recentRequesters(): User[] {
|
||||||
if (this.full._ !== 'channelFull' || !this.full.recentRequesters) return []
|
if (this.full._ !== 'channelFull' || !this.full.recentRequesters) return []
|
||||||
|
|
||||||
return this.full.recentRequesters.map(it => new User(this.peers.user(it.toNumber())))
|
return this.full.recentRequesters.map(it => new User(this.peers.user(it)))
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Reactions available in this chat */
|
/** Reactions available in this chat */
|
||||||
|
|
|
@ -15,7 +15,7 @@ export class StarsStatus {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Current Telegram Stars balance */
|
/** Current Telegram Stars balance */
|
||||||
get balance(): tl.Long {
|
get balance(): tl.RawStarsAmount {
|
||||||
return this.raw.balance
|
return this.raw.balance
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -151,18 +151,22 @@ export class StarsTransaction {
|
||||||
* Whether this transaction is outgoing or incoming
|
* Whether this transaction is outgoing or incoming
|
||||||
*/
|
*/
|
||||||
get direction(): 'incoming' | 'outgoing' {
|
get direction(): 'incoming' | 'outgoing' {
|
||||||
let isNegative = this.raw.stars.isNegative()
|
let isNegative = this.raw.stars.amount.isNegative()
|
||||||
if (this.raw.refund) isNegative = !isNegative
|
if (this.raw.refund) isNegative = !isNegative
|
||||||
|
|
||||||
return isNegative ? 'outgoing' : 'incoming'
|
return isNegative ? 'outgoing' : 'incoming'
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Absolute amount of stars in the transaction */
|
/** Absolute amount of stars in the transaction */
|
||||||
get amount(): tl.Long {
|
get amount(): tl.RawStarsAmount {
|
||||||
let res = this.raw.stars
|
let res = this.raw.stars
|
||||||
|
|
||||||
if (res.isNegative()) {
|
if (res.amount.isNegative()) {
|
||||||
res = res.negate()
|
res = {
|
||||||
|
...res,
|
||||||
|
nanos: Math.abs(res.nanos),
|
||||||
|
amount: res.amount.negate(),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
TL schema and related utils used for mtcute.
|
TL schema and related utils used for mtcute.
|
||||||
|
|
||||||
Generated from TL layer **194** (last updated on 20.11.2024).
|
Generated from TL layer **195** (last updated on 30.12.2024).
|
||||||
|
|
||||||
## About
|
## About
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -20,7 +20,7 @@
|
||||||
"channelAdminLogEventActionChangeLinkedChat": ["prev_value", "new_value"],
|
"channelAdminLogEventActionChangeLinkedChat": ["prev_value", "new_value"],
|
||||||
"channelAdminLogEventActionParticipantJoinByRequest": ["approved_by"],
|
"channelAdminLogEventActionParticipantJoinByRequest": ["approved_by"],
|
||||||
"channelForbidden": ["id"],
|
"channelForbidden": ["id"],
|
||||||
"channelFull": ["id", "linked_chat_id"],
|
"channelFull": ["id", "linked_chat_id", "recent_requesters"],
|
||||||
"channelParticipant": ["user_id"],
|
"channelParticipant": ["user_id"],
|
||||||
"channelParticipantAdmin": ["user_id", "inviter_id", "promoted_by"],
|
"channelParticipantAdmin": ["user_id", "inviter_id", "promoted_by"],
|
||||||
"channelParticipantBanned": ["kicked_by"],
|
"channelParticipantBanned": ["kicked_by"],
|
||||||
|
@ -39,6 +39,7 @@
|
||||||
"chatParticipants": ["chat_id"],
|
"chatParticipants": ["chat_id"],
|
||||||
"chatParticipantsForbidden": ["chat_id"],
|
"chatParticipantsForbidden": ["chat_id"],
|
||||||
"connectedBot": ["bot_id"],
|
"connectedBot": ["bot_id"],
|
||||||
|
"connectedBotStarRef": ["bot_id"],
|
||||||
"contact": ["user_id"],
|
"contact": ["user_id"],
|
||||||
"contactStatus": ["user_id"],
|
"contactStatus": ["user_id"],
|
||||||
"document": ["size"],
|
"document": ["size"],
|
||||||
|
@ -100,6 +101,7 @@
|
||||||
"requestedPeerChannel": ["channel_id"],
|
"requestedPeerChannel": ["channel_id"],
|
||||||
"requestedPeerChat": ["chat_id"],
|
"requestedPeerChat": ["chat_id"],
|
||||||
"requestedPeerUser": ["user_id"],
|
"requestedPeerUser": ["user_id"],
|
||||||
|
"starRefProgram": ["bot_id"],
|
||||||
"secureFile": ["size"],
|
"secureFile": ["size"],
|
||||||
"statsGroupTopAdmin": ["user_id"],
|
"statsGroupTopAdmin": ["user_id"],
|
||||||
"statsGroupTopInviter": ["user_id"],
|
"statsGroupTopInviter": ["user_id"],
|
||||||
|
@ -109,14 +111,15 @@
|
||||||
"updateBotCallbackQuery": ["user_id"],
|
"updateBotCallbackQuery": ["user_id"],
|
||||||
"updateBusinessBotCallbackQuery": ["user_id"],
|
"updateBusinessBotCallbackQuery": ["user_id"],
|
||||||
"updateBotCommands": ["bot_id"],
|
"updateBotCommands": ["bot_id"],
|
||||||
|
"updateBotChatInviteRequester": ["user_id"],
|
||||||
"updateBotInlineQuery": ["user_id"],
|
"updateBotInlineQuery": ["user_id"],
|
||||||
"updateBotInlineSend": ["user_id"],
|
"updateBotInlineSend": ["user_id"],
|
||||||
"updateBotMenuButton": ["bot_id"],
|
"updateBotMenuButton": ["bot_id"],
|
||||||
"updateBotPrecheckoutQuery": ["user_id"],
|
"updateBotPrecheckoutQuery": ["user_id"],
|
||||||
"updateBotPurchasedPaidMedia": ["user_id"],
|
"updateBotPurchasedPaidMedia": ["user_id"],
|
||||||
"updateBotShippingQuery": ["user_id"],
|
"updateBotShippingQuery": ["user_id"],
|
||||||
|
"updateBotSubscriptionExpire": ["user_id"],
|
||||||
"updateBotStopped": ["user_id"],
|
"updateBotStopped": ["user_id"],
|
||||||
"updateBotChatInviteRequester": ["user_id"],
|
|
||||||
"updatePendingJoinRequests": ["recent_requesters"],
|
"updatePendingJoinRequests": ["recent_requesters"],
|
||||||
"updateChannel": ["channel_id"],
|
"updateChannel": ["channel_id"],
|
||||||
"updateChannelAvailableMessages": ["channel_id"],
|
"updateChannelAvailableMessages": ["channel_id"],
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@mtcute/tl",
|
"name": "@mtcute/tl",
|
||||||
"version": "194.0.0",
|
"version": "195.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