@mtcute/core 0.28.0 → 0.28.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client.cjs +16 -0
- package/client.js +16 -0
- package/highlevel/base.cjs +2 -0
- package/highlevel/base.js +2 -0
- package/highlevel/client.d.cts +74 -5
- package/highlevel/client.d.ts +74 -5
- package/highlevel/methods/chats/batched-queries.cjs +2 -4
- package/highlevel/methods/chats/batched-queries.d.cts +1 -1
- package/highlevel/methods/chats/batched-queries.d.ts +1 -1
- package/highlevel/methods/chats/batched-queries.js +2 -4
- package/highlevel/methods/chats/edit-chat-member-rank.cjs +19 -0
- package/highlevel/methods/chats/edit-chat-member-rank.d.cts +13 -0
- package/highlevel/methods/chats/edit-chat-member-rank.d.ts +13 -0
- package/highlevel/methods/chats/edit-chat-member-rank.js +14 -0
- package/highlevel/methods/chats/get-chats.cjs +27 -0
- package/highlevel/methods/chats/get-chats.d.cts +9 -0
- package/highlevel/methods/chats/get-chats.d.ts +9 -0
- package/highlevel/methods/chats/get-chats.js +22 -0
- package/highlevel/methods/chats/get-chats.test.d.cts +1 -0
- package/highlevel/methods/chats/get-chats.test.d.ts +1 -0
- package/highlevel/methods/chats/get-creator-after-leave.cjs +20 -4
- package/highlevel/methods/chats/get-creator-after-leave.d.cts +2 -2
- package/highlevel/methods/chats/get-creator-after-leave.d.ts +2 -2
- package/highlevel/methods/chats/get-creator-after-leave.js +21 -5
- package/highlevel/methods/chats/get-peers.cjs +16 -0
- package/highlevel/methods/chats/get-peers.d.cts +9 -0
- package/highlevel/methods/chats/get-peers.d.ts +9 -0
- package/highlevel/methods/chats/get-peers.js +11 -0
- package/highlevel/methods/chats/get-peers.test.d.cts +1 -0
- package/highlevel/methods/chats/get-peers.test.d.ts +1 -0
- package/highlevel/methods/chats/toggle-content-protection.cjs +3 -2
- package/highlevel/methods/chats/toggle-content-protection.d.cts +4 -1
- package/highlevel/methods/chats/toggle-content-protection.d.ts +4 -1
- package/highlevel/methods/chats/toggle-content-protection.js +3 -2
- package/highlevel/methods/chats/transfer-chat-ownership.cjs +36 -0
- package/highlevel/methods/chats/transfer-chat-ownership.d.cts +16 -0
- package/highlevel/methods/chats/transfer-chat-ownership.d.ts +16 -0
- package/highlevel/methods/chats/transfer-chat-ownership.js +31 -0
- package/highlevel/methods/contacts/set-contact-note.cjs +2 -0
- package/highlevel/methods/contacts/set-contact-note.js +2 -0
- package/highlevel/methods/files/upload-file.cjs +2 -2
- package/highlevel/methods/files/upload-file.js +2 -2
- package/highlevel/methods/users/get-users.d.cts +1 -2
- package/highlevel/methods/users/get-users.d.ts +1 -2
- package/highlevel/methods/users/resolve-peer.cjs +4 -4
- package/highlevel/methods/users/resolve-peer.js +4 -4
- package/highlevel/methods.d.cts +4 -0
- package/highlevel/methods.d.ts +4 -0
- package/highlevel/types/messages/message-action.cjs +13 -0
- package/highlevel/types/messages/message-action.d.cts +19 -1
- package/highlevel/types/messages/message-action.d.ts +19 -1
- package/highlevel/types/messages/message-action.js +13 -0
- package/highlevel/types/messages/message.cjs +4 -0
- package/highlevel/types/messages/message.d.cts +2 -0
- package/highlevel/types/messages/message.d.ts +2 -0
- package/highlevel/types/messages/message.js +4 -0
- package/highlevel/types/peers/chat-event/actions.cjs +7 -0
- package/highlevel/types/peers/chat-event/actions.d.cts +11 -1
- package/highlevel/types/peers/chat-event/actions.d.ts +11 -1
- package/highlevel/types/peers/chat-event/actions.js +7 -0
- package/highlevel/types/peers/chat-event/filters.cjs +1 -0
- package/highlevel/types/peers/chat-event/filters.js +1 -0
- package/highlevel/types/peers/chat-member.cjs +5 -8
- package/highlevel/types/peers/chat-member.d.cts +2 -2
- package/highlevel/types/peers/chat-member.d.ts +2 -2
- package/highlevel/types/peers/chat-member.js +5 -8
- package/highlevel/types/peers/full-user.cjs +14 -0
- package/highlevel/types/peers/full-user.d.cts +10 -0
- package/highlevel/types/peers/full-user.d.ts +10 -0
- package/highlevel/types/peers/full-user.js +14 -0
- package/highlevel/types/peers/peer.cjs +13 -3
- package/highlevel/types/peers/peer.d.cts +4 -0
- package/highlevel/types/peers/peer.d.ts +4 -0
- package/highlevel/types/peers/peer.js +13 -3
- package/highlevel/updates/manager.cjs +2 -0
- package/highlevel/updates/manager.js +2 -0
- package/highlevel/utils/file-utils.cjs +2 -2
- package/highlevel/utils/file-utils.d.cts +1 -1
- package/highlevel/utils/file-utils.d.ts +1 -1
- package/highlevel/utils/file-utils.js +2 -2
- package/methods.cjs +8 -0
- package/methods.js +8 -0
- package/network/mtproto-session.cjs +2 -0
- package/network/mtproto-session.js +2 -0
- package/network/network-manager.cjs +1 -1
- package/network/network-manager.js +1 -1
- package/network/server-salt.cjs +4 -8
- package/network/server-salt.js +4 -8
- package/network/session-connection.cjs +2 -0
- package/network/session-connection.js +2 -0
- package/network/transports/intermediate.cjs +2 -0
- package/network/transports/intermediate.js +2 -0
- package/package.json +3 -3
- package/storage/storage.cjs +2 -0
- package/storage/storage.js +2 -0
- package/utils/binary/compat.cjs +9 -0
- package/utils/binary/compat.d.cts +3 -0
- package/utils/binary/compat.d.ts +3 -0
- package/utils/binary/compat.js +10 -1
- package/utils/date-entity-format.cjs +48 -0
- package/utils/date-entity-format.d.cts +24 -0
- package/utils/date-entity-format.d.ts +24 -0
- package/utils/date-entity-format.js +43 -0
- package/utils/date-entity-format.test.d.cts +1 -0
- package/utils/date-entity-format.test.d.ts +1 -0
- package/utils/index.d.cts +3 -0
- package/utils/index.d.ts +3 -0
- package/utils/links/bots.cjs +3 -0
- package/utils/links/bots.js +3 -0
- package/utils.cjs +14 -0
- package/utils.js +9 -1
|
@@ -573,6 +573,24 @@ export interface ActionSuggestBirthday {
|
|
|
573
573
|
/** Birthday */
|
|
574
574
|
birthday: tl.RawBirthday;
|
|
575
575
|
}
|
|
576
|
+
/** Content protection (no-forwards) was toggled */
|
|
577
|
+
export interface ActionNoForwardsToggle {
|
|
578
|
+
readonly type: 'no_forwards_toggle';
|
|
579
|
+
/** Previous value */
|
|
580
|
+
prevValue: boolean;
|
|
581
|
+
/** New value */
|
|
582
|
+
newValue: boolean;
|
|
583
|
+
}
|
|
584
|
+
/** Content protection (no-forwards) toggle was requested */
|
|
585
|
+
export interface ActionNoForwardsRequest {
|
|
586
|
+
readonly type: 'no_forwards_request';
|
|
587
|
+
/** Whether this request has expired */
|
|
588
|
+
expired: boolean;
|
|
589
|
+
/** Previous value */
|
|
590
|
+
prevValue: boolean;
|
|
591
|
+
/** New value */
|
|
592
|
+
newValue: boolean;
|
|
593
|
+
}
|
|
576
594
|
/** Group creator has left the group, and a new creator has been assigned but not yet made one */
|
|
577
595
|
export interface ActionNewCreatorPending {
|
|
578
596
|
readonly type: 'new_creator_pending';
|
|
@@ -585,7 +603,7 @@ export interface ActionChangeCreator {
|
|
|
585
603
|
/** New creator */
|
|
586
604
|
newCreator: User;
|
|
587
605
|
}
|
|
588
|
-
export type MessageAction = ActionChatCreated | ActionChannelCreated | ActionChatMigrateTo | ActionChannelMigrateFrom | ActionMessagePinned | ActionHistoryCleared | ActionGameScore | ActionContactJoined | ActionTitleChanged | ActionPhotoChanged | ActionPhotoDeleted | ActionUsersAdded | ActionUserLeft | ActionUserRemoved | ActionUserJoinedLink | ActionPaymentReceived | ActionPaymentSent | ActionCall | ActionScreenshotTaken | ActionBotAllowed | ActionGeoProximity | ActionGroupCallStarted | ActionGroupCallEnded | ActionGroupCallScheduled | ActionGroupInvite | ActionTtlChanged | ActionTopicCreated | ActionTopicEdited | ActionCustom | ActionThemeChanged | ActionThemeChangedUnique | ActionUserJoinedApproved | ActionWebviewDataSent | ActionWebviewDataReceived | ActionPremiumGifted | ActionPhotoSuggested | ActionPeerSent | ActionPeerChosen | ActionWallpaperChanged | ActionGiftCode | ActionGiveawayStarted | ActionGiveawayEnded | ActionBoostApply | ActionPaymentRefunded | ActionStarGifted | ActionStarsPrize | ActionStarGiftSent | ActionStarGiftUpgradePaid | ActionStarGiftUpgraded | ActionStarGiftBoughtResale | ActionStarGiftTransferred | ActionStarGiftAssigned | ActionPaidMessagesPaid | ActionPaidMessagesRefunded | ActionTodoCompletions | ActionTodoAppendTasks | ActionTonGift | ActionSuggestBirthday | ActionStarGiftPurchaseOffer | ActionStarGiftPurchaseOfferDeclined | ActionStarGiftBoughtOffer | ActionStarGiftCrafted | ActionNewCreatorPending | ActionChangeCreator | null;
|
|
606
|
+
export type MessageAction = ActionChatCreated | ActionChannelCreated | ActionChatMigrateTo | ActionChannelMigrateFrom | ActionMessagePinned | ActionHistoryCleared | ActionGameScore | ActionContactJoined | ActionTitleChanged | ActionPhotoChanged | ActionPhotoDeleted | ActionUsersAdded | ActionUserLeft | ActionUserRemoved | ActionUserJoinedLink | ActionPaymentReceived | ActionPaymentSent | ActionCall | ActionScreenshotTaken | ActionBotAllowed | ActionGeoProximity | ActionGroupCallStarted | ActionGroupCallEnded | ActionGroupCallScheduled | ActionGroupInvite | ActionTtlChanged | ActionTopicCreated | ActionTopicEdited | ActionCustom | ActionThemeChanged | ActionThemeChangedUnique | ActionUserJoinedApproved | ActionWebviewDataSent | ActionWebviewDataReceived | ActionPremiumGifted | ActionPhotoSuggested | ActionPeerSent | ActionPeerChosen | ActionWallpaperChanged | ActionGiftCode | ActionGiveawayStarted | ActionGiveawayEnded | ActionBoostApply | ActionPaymentRefunded | ActionStarGifted | ActionStarsPrize | ActionStarGiftSent | ActionStarGiftUpgradePaid | ActionStarGiftUpgraded | ActionStarGiftBoughtResale | ActionStarGiftTransferred | ActionStarGiftAssigned | ActionPaidMessagesPaid | ActionPaidMessagesRefunded | ActionTodoCompletions | ActionTodoAppendTasks | ActionTonGift | ActionSuggestBirthday | ActionStarGiftPurchaseOffer | ActionStarGiftPurchaseOfferDeclined | ActionStarGiftBoughtOffer | ActionStarGiftCrafted | ActionNewCreatorPending | ActionChangeCreator | ActionNoForwardsToggle | ActionNoForwardsRequest | null;
|
|
589
607
|
/** @internal */
|
|
590
608
|
export declare function _messageActionFromTl(this: Message, act: tl.TypeMessageAction): MessageAction;
|
|
591
609
|
export {};
|
|
@@ -573,6 +573,24 @@ export interface ActionSuggestBirthday {
|
|
|
573
573
|
/** Birthday */
|
|
574
574
|
birthday: tl.RawBirthday;
|
|
575
575
|
}
|
|
576
|
+
/** Content protection (no-forwards) was toggled */
|
|
577
|
+
export interface ActionNoForwardsToggle {
|
|
578
|
+
readonly type: 'no_forwards_toggle';
|
|
579
|
+
/** Previous value */
|
|
580
|
+
prevValue: boolean;
|
|
581
|
+
/** New value */
|
|
582
|
+
newValue: boolean;
|
|
583
|
+
}
|
|
584
|
+
/** Content protection (no-forwards) toggle was requested */
|
|
585
|
+
export interface ActionNoForwardsRequest {
|
|
586
|
+
readonly type: 'no_forwards_request';
|
|
587
|
+
/** Whether this request has expired */
|
|
588
|
+
expired: boolean;
|
|
589
|
+
/** Previous value */
|
|
590
|
+
prevValue: boolean;
|
|
591
|
+
/** New value */
|
|
592
|
+
newValue: boolean;
|
|
593
|
+
}
|
|
576
594
|
/** Group creator has left the group, and a new creator has been assigned but not yet made one */
|
|
577
595
|
export interface ActionNewCreatorPending {
|
|
578
596
|
readonly type: 'new_creator_pending';
|
|
@@ -585,7 +603,7 @@ export interface ActionChangeCreator {
|
|
|
585
603
|
/** New creator */
|
|
586
604
|
newCreator: User;
|
|
587
605
|
}
|
|
588
|
-
export type MessageAction = ActionChatCreated | ActionChannelCreated | ActionChatMigrateTo | ActionChannelMigrateFrom | ActionMessagePinned | ActionHistoryCleared | ActionGameScore | ActionContactJoined | ActionTitleChanged | ActionPhotoChanged | ActionPhotoDeleted | ActionUsersAdded | ActionUserLeft | ActionUserRemoved | ActionUserJoinedLink | ActionPaymentReceived | ActionPaymentSent | ActionCall | ActionScreenshotTaken | ActionBotAllowed | ActionGeoProximity | ActionGroupCallStarted | ActionGroupCallEnded | ActionGroupCallScheduled | ActionGroupInvite | ActionTtlChanged | ActionTopicCreated | ActionTopicEdited | ActionCustom | ActionThemeChanged | ActionThemeChangedUnique | ActionUserJoinedApproved | ActionWebviewDataSent | ActionWebviewDataReceived | ActionPremiumGifted | ActionPhotoSuggested | ActionPeerSent | ActionPeerChosen | ActionWallpaperChanged | ActionGiftCode | ActionGiveawayStarted | ActionGiveawayEnded | ActionBoostApply | ActionPaymentRefunded | ActionStarGifted | ActionStarsPrize | ActionStarGiftSent | ActionStarGiftUpgradePaid | ActionStarGiftUpgraded | ActionStarGiftBoughtResale | ActionStarGiftTransferred | ActionStarGiftAssigned | ActionPaidMessagesPaid | ActionPaidMessagesRefunded | ActionTodoCompletions | ActionTodoAppendTasks | ActionTonGift | ActionSuggestBirthday | ActionStarGiftPurchaseOffer | ActionStarGiftPurchaseOfferDeclined | ActionStarGiftBoughtOffer | ActionStarGiftCrafted | ActionNewCreatorPending | ActionChangeCreator | null;
|
|
606
|
+
export type MessageAction = ActionChatCreated | ActionChannelCreated | ActionChatMigrateTo | ActionChannelMigrateFrom | ActionMessagePinned | ActionHistoryCleared | ActionGameScore | ActionContactJoined | ActionTitleChanged | ActionPhotoChanged | ActionPhotoDeleted | ActionUsersAdded | ActionUserLeft | ActionUserRemoved | ActionUserJoinedLink | ActionPaymentReceived | ActionPaymentSent | ActionCall | ActionScreenshotTaken | ActionBotAllowed | ActionGeoProximity | ActionGroupCallStarted | ActionGroupCallEnded | ActionGroupCallScheduled | ActionGroupInvite | ActionTtlChanged | ActionTopicCreated | ActionTopicEdited | ActionCustom | ActionThemeChanged | ActionThemeChangedUnique | ActionUserJoinedApproved | ActionWebviewDataSent | ActionWebviewDataReceived | ActionPremiumGifted | ActionPhotoSuggested | ActionPeerSent | ActionPeerChosen | ActionWallpaperChanged | ActionGiftCode | ActionGiveawayStarted | ActionGiveawayEnded | ActionBoostApply | ActionPaymentRefunded | ActionStarGifted | ActionStarsPrize | ActionStarGiftSent | ActionStarGiftUpgradePaid | ActionStarGiftUpgraded | ActionStarGiftBoughtResale | ActionStarGiftTransferred | ActionStarGiftAssigned | ActionPaidMessagesPaid | ActionPaidMessagesRefunded | ActionTodoCompletions | ActionTodoAppendTasks | ActionTonGift | ActionSuggestBirthday | ActionStarGiftPurchaseOffer | ActionStarGiftPurchaseOfferDeclined | ActionStarGiftBoughtOffer | ActionStarGiftCrafted | ActionNewCreatorPending | ActionChangeCreator | ActionNoForwardsToggle | ActionNoForwardsRequest | null;
|
|
589
607
|
/** @internal */
|
|
590
608
|
export declare function _messageActionFromTl(this: Message, act: tl.TypeMessageAction): MessageAction;
|
|
591
609
|
export {};
|
|
@@ -429,6 +429,19 @@ function _messageActionFromTl(act) {
|
|
|
429
429
|
type: "change_creator",
|
|
430
430
|
newCreator: new User$2(this._peers.user(act.newCreatorId))
|
|
431
431
|
};
|
|
432
|
+
case "messageActionNoForwardsToggle":
|
|
433
|
+
return {
|
|
434
|
+
type: "no_forwards_toggle",
|
|
435
|
+
prevValue: act.prevValue,
|
|
436
|
+
newValue: act.newValue
|
|
437
|
+
};
|
|
438
|
+
case "messageActionNoForwardsRequest":
|
|
439
|
+
return {
|
|
440
|
+
type: "no_forwards_request",
|
|
441
|
+
expired: act.expired,
|
|
442
|
+
prevValue: act.prevValue,
|
|
443
|
+
newValue: act.newValue
|
|
444
|
+
};
|
|
432
445
|
default:
|
|
433
446
|
return null;
|
|
434
447
|
}
|
|
@@ -95,6 +95,10 @@ class Message {
|
|
|
95
95
|
get hasUnreadMedia() {
|
|
96
96
|
return this.raw.mediaUnread;
|
|
97
97
|
}
|
|
98
|
+
/** For messages in groups chats, the rank of the sender, if any */
|
|
99
|
+
get fromRank() {
|
|
100
|
+
return this.raw._ === "message" ? this.raw.fromRank ?? null : null;
|
|
101
|
+
}
|
|
98
102
|
/** Whether this is a broadcast channel post */
|
|
99
103
|
get isChannelPost() {
|
|
100
104
|
return this.raw._ === "message" && this.raw.post;
|
|
@@ -74,6 +74,8 @@ export declare class Message {
|
|
|
74
74
|
get isSilent(): boolean;
|
|
75
75
|
/** Whether there are unread media attachments in this message */
|
|
76
76
|
get hasUnreadMedia(): boolean;
|
|
77
|
+
/** For messages in groups chats, the rank of the sender, if any */
|
|
78
|
+
get fromRank(): string | null;
|
|
77
79
|
/** Whether this is a broadcast channel post */
|
|
78
80
|
get isChannelPost(): boolean;
|
|
79
81
|
/**
|
|
@@ -74,6 +74,8 @@ export declare class Message {
|
|
|
74
74
|
get isSilent(): boolean;
|
|
75
75
|
/** Whether there are unread media attachments in this message */
|
|
76
76
|
get hasUnreadMedia(): boolean;
|
|
77
|
+
/** For messages in groups chats, the rank of the sender, if any */
|
|
78
|
+
get fromRank(): string | null;
|
|
77
79
|
/** Whether this is a broadcast channel post */
|
|
78
80
|
get isChannelPost(): boolean;
|
|
79
81
|
/**
|
|
@@ -88,6 +88,10 @@ class Message {
|
|
|
88
88
|
get hasUnreadMedia() {
|
|
89
89
|
return this.raw.mediaUnread;
|
|
90
90
|
}
|
|
91
|
+
/** For messages in groups chats, the rank of the sender, if any */
|
|
92
|
+
get fromRank() {
|
|
93
|
+
return this.raw._ === "message" ? this.raw.fromRank ?? null : null;
|
|
94
|
+
}
|
|
91
95
|
/** Whether this is a broadcast channel post */
|
|
92
96
|
get isChannelPost() {
|
|
93
97
|
return this.raw._ === "message" && this.raw.post;
|
|
@@ -284,6 +284,13 @@ function _actionFromTl(e, peers, peerId) {
|
|
|
284
284
|
type: "toggle_autotranslation",
|
|
285
285
|
enabled: e.newValue
|
|
286
286
|
};
|
|
287
|
+
case "channelAdminLogEventActionParticipantEditRank":
|
|
288
|
+
return {
|
|
289
|
+
type: "participant_rank_edited",
|
|
290
|
+
user: new user.User(peers.user(e.userId)),
|
|
291
|
+
prevRank: e.prevRank,
|
|
292
|
+
newRank: e.newRank
|
|
293
|
+
};
|
|
287
294
|
default:
|
|
288
295
|
return null;
|
|
289
296
|
}
|
|
@@ -325,6 +325,16 @@ export interface ChatActionToggleAntiSpam {
|
|
|
325
325
|
/** Whether the chat now has aggressive anti-spam enabled */
|
|
326
326
|
enabled: boolean;
|
|
327
327
|
}
|
|
328
|
+
/** Participant rank was edited */
|
|
329
|
+
export interface ChatActionParticipantRankEdited {
|
|
330
|
+
type: 'participant_rank_edited';
|
|
331
|
+
/** User whose rank was edited */
|
|
332
|
+
user: User;
|
|
333
|
+
/** Previous rank */
|
|
334
|
+
prevRank: string;
|
|
335
|
+
/** New rank */
|
|
336
|
+
newRank: string;
|
|
337
|
+
}
|
|
328
338
|
/** Auto-translation has been toggled */
|
|
329
339
|
export interface ChatActionToggleAutotranslation {
|
|
330
340
|
type: 'toggle_autotranslation';
|
|
@@ -332,6 +342,6 @@ export interface ChatActionToggleAutotranslation {
|
|
|
332
342
|
enabled: boolean;
|
|
333
343
|
}
|
|
334
344
|
/** Chat event action (`null` if unsupported) */
|
|
335
|
-
export type ChatAction = ChatActionUserJoined | ChatActionUserLeft | ChatActionUserInvited | ChatActionTitleChanged | ChatActionDescriptionChanged | ChatActionUsernameChanged | ChatActionUsernamesChanged | ChatActionPhotoChanged | ChatActionInvitesToggled | ChatActionSignaturesToggled | ChatActionMessagePinned | ChatActionMessageEdited | ChatActionMessageDeleted | ChatActionUserPermissionsChanged | ChatActionUserAdminPermissionsChanged | ChatActionStickersetChanged | ChatActionHistoryToggled | ChatActionDefaultPermissionsChanged | ChatActionPollStopped | ChatActionLinkedChatChanged | ChatActionLocationChanged | ChatActionSlowModeChanged | ChatActionCallStarted | ChatActionCallEnded | ChatActionCallSettingChanged | ChatActionUserJoinedInvite | ChatActionInviteLinkDeleted | ChatActionInviteLinkEdited | ChatActionInviteLinkRevoked | ChatActionUserJoinedApproved | ChatActionTtlChanged | ChatActionNoForwardsToggled | ChatActionForumToggled | ChatActionTopicCreated | ChatActionTopicEdited | ChatActionTopicDeleted | ChatActionSignatureProfilesToggled | ChatActionSubscriptionExtended | ChatActionAvailableReactionsChanged | ChatActionEmojiStatusChanged | ChatActionEmojiStickersetChanged | ChatActionPeerColorChanged | ChatActionWallpaperChanged | ChatActionMessageSent | ChatActionToggleAntiSpam | ChatActionToggleAutotranslation | null;
|
|
345
|
+
export type ChatAction = ChatActionUserJoined | ChatActionUserLeft | ChatActionUserInvited | ChatActionTitleChanged | ChatActionDescriptionChanged | ChatActionUsernameChanged | ChatActionUsernamesChanged | ChatActionPhotoChanged | ChatActionInvitesToggled | ChatActionSignaturesToggled | ChatActionMessagePinned | ChatActionMessageEdited | ChatActionMessageDeleted | ChatActionUserPermissionsChanged | ChatActionUserAdminPermissionsChanged | ChatActionStickersetChanged | ChatActionHistoryToggled | ChatActionDefaultPermissionsChanged | ChatActionPollStopped | ChatActionLinkedChatChanged | ChatActionLocationChanged | ChatActionSlowModeChanged | ChatActionCallStarted | ChatActionCallEnded | ChatActionCallSettingChanged | ChatActionUserJoinedInvite | ChatActionInviteLinkDeleted | ChatActionInviteLinkEdited | ChatActionInviteLinkRevoked | ChatActionUserJoinedApproved | ChatActionTtlChanged | ChatActionNoForwardsToggled | ChatActionForumToggled | ChatActionTopicCreated | ChatActionTopicEdited | ChatActionTopicDeleted | ChatActionSignatureProfilesToggled | ChatActionSubscriptionExtended | ChatActionAvailableReactionsChanged | ChatActionEmojiStatusChanged | ChatActionEmojiStickersetChanged | ChatActionPeerColorChanged | ChatActionWallpaperChanged | ChatActionMessageSent | ChatActionToggleAntiSpam | ChatActionToggleAutotranslation | ChatActionParticipantRankEdited | null;
|
|
336
346
|
/** @internal */
|
|
337
347
|
export declare function _actionFromTl(e: tl.TypeChannelAdminLogEventAction, peers: PeersIndex, peerId: number): ChatAction;
|
|
@@ -325,6 +325,16 @@ export interface ChatActionToggleAntiSpam {
|
|
|
325
325
|
/** Whether the chat now has aggressive anti-spam enabled */
|
|
326
326
|
enabled: boolean;
|
|
327
327
|
}
|
|
328
|
+
/** Participant rank was edited */
|
|
329
|
+
export interface ChatActionParticipantRankEdited {
|
|
330
|
+
type: 'participant_rank_edited';
|
|
331
|
+
/** User whose rank was edited */
|
|
332
|
+
user: User;
|
|
333
|
+
/** Previous rank */
|
|
334
|
+
prevRank: string;
|
|
335
|
+
/** New rank */
|
|
336
|
+
newRank: string;
|
|
337
|
+
}
|
|
328
338
|
/** Auto-translation has been toggled */
|
|
329
339
|
export interface ChatActionToggleAutotranslation {
|
|
330
340
|
type: 'toggle_autotranslation';
|
|
@@ -332,6 +342,6 @@ export interface ChatActionToggleAutotranslation {
|
|
|
332
342
|
enabled: boolean;
|
|
333
343
|
}
|
|
334
344
|
/** Chat event action (`null` if unsupported) */
|
|
335
|
-
export type ChatAction = ChatActionUserJoined | ChatActionUserLeft | ChatActionUserInvited | ChatActionTitleChanged | ChatActionDescriptionChanged | ChatActionUsernameChanged | ChatActionUsernamesChanged | ChatActionPhotoChanged | ChatActionInvitesToggled | ChatActionSignaturesToggled | ChatActionMessagePinned | ChatActionMessageEdited | ChatActionMessageDeleted | ChatActionUserPermissionsChanged | ChatActionUserAdminPermissionsChanged | ChatActionStickersetChanged | ChatActionHistoryToggled | ChatActionDefaultPermissionsChanged | ChatActionPollStopped | ChatActionLinkedChatChanged | ChatActionLocationChanged | ChatActionSlowModeChanged | ChatActionCallStarted | ChatActionCallEnded | ChatActionCallSettingChanged | ChatActionUserJoinedInvite | ChatActionInviteLinkDeleted | ChatActionInviteLinkEdited | ChatActionInviteLinkRevoked | ChatActionUserJoinedApproved | ChatActionTtlChanged | ChatActionNoForwardsToggled | ChatActionForumToggled | ChatActionTopicCreated | ChatActionTopicEdited | ChatActionTopicDeleted | ChatActionSignatureProfilesToggled | ChatActionSubscriptionExtended | ChatActionAvailableReactionsChanged | ChatActionEmojiStatusChanged | ChatActionEmojiStickersetChanged | ChatActionPeerColorChanged | ChatActionWallpaperChanged | ChatActionMessageSent | ChatActionToggleAntiSpam | ChatActionToggleAutotranslation | null;
|
|
345
|
+
export type ChatAction = ChatActionUserJoined | ChatActionUserLeft | ChatActionUserInvited | ChatActionTitleChanged | ChatActionDescriptionChanged | ChatActionUsernameChanged | ChatActionUsernamesChanged | ChatActionPhotoChanged | ChatActionInvitesToggled | ChatActionSignaturesToggled | ChatActionMessagePinned | ChatActionMessageEdited | ChatActionMessageDeleted | ChatActionUserPermissionsChanged | ChatActionUserAdminPermissionsChanged | ChatActionStickersetChanged | ChatActionHistoryToggled | ChatActionDefaultPermissionsChanged | ChatActionPollStopped | ChatActionLinkedChatChanged | ChatActionLocationChanged | ChatActionSlowModeChanged | ChatActionCallStarted | ChatActionCallEnded | ChatActionCallSettingChanged | ChatActionUserJoinedInvite | ChatActionInviteLinkDeleted | ChatActionInviteLinkEdited | ChatActionInviteLinkRevoked | ChatActionUserJoinedApproved | ChatActionTtlChanged | ChatActionNoForwardsToggled | ChatActionForumToggled | ChatActionTopicCreated | ChatActionTopicEdited | ChatActionTopicDeleted | ChatActionSignatureProfilesToggled | ChatActionSubscriptionExtended | ChatActionAvailableReactionsChanged | ChatActionEmojiStatusChanged | ChatActionEmojiStickersetChanged | ChatActionPeerColorChanged | ChatActionWallpaperChanged | ChatActionMessageSent | ChatActionToggleAntiSpam | ChatActionToggleAutotranslation | ChatActionParticipantRankEdited | null;
|
|
336
346
|
/** @internal */
|
|
337
347
|
export declare function _actionFromTl(e: tl.TypeChannelAdminLogEventAction, peers: PeersIndex, peerId: number): ChatAction;
|
|
@@ -277,6 +277,13 @@ function _actionFromTl(e, peers, peerId) {
|
|
|
277
277
|
type: "toggle_autotranslation",
|
|
278
278
|
enabled: e.newValue
|
|
279
279
|
};
|
|
280
|
+
case "channelAdminLogEventActionParticipantEditRank":
|
|
281
|
+
return {
|
|
282
|
+
type: "participant_rank_edited",
|
|
283
|
+
user: new User$2(peers.user(e.userId)),
|
|
284
|
+
prevRank: e.prevRank,
|
|
285
|
+
newRank: e.newRank
|
|
286
|
+
};
|
|
280
287
|
default:
|
|
281
288
|
return null;
|
|
282
289
|
}
|
|
@@ -100,6 +100,7 @@ function normalizeChatEventFilters(input) {
|
|
|
100
100
|
case "wallpaper_changed":
|
|
101
101
|
case "toggle_anti_spam":
|
|
102
102
|
case "toggle_autotranslation":
|
|
103
|
+
case "participant_rank_edited":
|
|
103
104
|
serverFilter.invite = true;
|
|
104
105
|
serverFilter.invites = true;
|
|
105
106
|
serverFilter.join = true;
|
|
@@ -50,18 +50,15 @@ class ChatMember {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
* Custom title (
|
|
53
|
+
* Custom title (rank) of the chat member.
|
|
54
54
|
*
|
|
55
|
-
* `null`
|
|
55
|
+
* `null` in case custom title (rank) is not set.
|
|
56
56
|
*/
|
|
57
57
|
get title() {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
case "channelParticipantAdmin":
|
|
61
|
-
return this.raw.rank ?? null;
|
|
62
|
-
default:
|
|
63
|
-
return null;
|
|
58
|
+
if ("rank" in this.raw) {
|
|
59
|
+
return this.raw.rank ?? null;
|
|
64
60
|
}
|
|
61
|
+
return null;
|
|
65
62
|
}
|
|
66
63
|
/**
|
|
67
64
|
* Date when the user has joined the chat.
|
|
@@ -28,9 +28,9 @@ export declare class ChatMember {
|
|
|
28
28
|
*/
|
|
29
29
|
get status(): ChatMemberStatus;
|
|
30
30
|
/**
|
|
31
|
-
* Custom title (
|
|
31
|
+
* Custom title (rank) of the chat member.
|
|
32
32
|
*
|
|
33
|
-
* `null`
|
|
33
|
+
* `null` in case custom title (rank) is not set.
|
|
34
34
|
*/
|
|
35
35
|
get title(): string | null;
|
|
36
36
|
/**
|
|
@@ -28,9 +28,9 @@ export declare class ChatMember {
|
|
|
28
28
|
*/
|
|
29
29
|
get status(): ChatMemberStatus;
|
|
30
30
|
/**
|
|
31
|
-
* Custom title (
|
|
31
|
+
* Custom title (rank) of the chat member.
|
|
32
32
|
*
|
|
33
|
-
* `null`
|
|
33
|
+
* `null` in case custom title (rank) is not set.
|
|
34
34
|
*/
|
|
35
35
|
get title(): string | null;
|
|
36
36
|
/**
|
|
@@ -43,18 +43,15 @@ class ChatMember {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
|
-
* Custom title (
|
|
46
|
+
* Custom title (rank) of the chat member.
|
|
47
47
|
*
|
|
48
|
-
* `null`
|
|
48
|
+
* `null` in case custom title (rank) is not set.
|
|
49
49
|
*/
|
|
50
50
|
get title() {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
case "channelParticipantAdmin":
|
|
54
|
-
return this.raw.rank ?? null;
|
|
55
|
-
default:
|
|
56
|
-
return null;
|
|
51
|
+
if ("rank" in this.raw) {
|
|
52
|
+
return this.raw.rank ?? null;
|
|
57
53
|
}
|
|
54
|
+
return null;
|
|
58
55
|
}
|
|
59
56
|
/**
|
|
60
57
|
* Date when the user has joined the chat.
|
|
@@ -199,6 +199,20 @@ class FullUser extends user.User {
|
|
|
199
199
|
get ttlPeriod() {
|
|
200
200
|
return this.full?.ttlPeriod ?? null;
|
|
201
201
|
}
|
|
202
|
+
/**
|
|
203
|
+
* Whether the current user has enabled content protection for own messages in DMs with this user,
|
|
204
|
+
* i.e. our outgoing messages to this user will be `noforwards`.
|
|
205
|
+
*/
|
|
206
|
+
get contentProtectionOutgoing() {
|
|
207
|
+
return this.full.noforwardsMyEnabled;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Whether this user has enabled content protection for their messages in DMs with the current user,
|
|
211
|
+
* i.e. our incoming messages from this user will be `noforwards`.
|
|
212
|
+
*/
|
|
213
|
+
get contentProtectionIncoming() {
|
|
214
|
+
return this.full.noforwardsPeerEnabled;
|
|
215
|
+
}
|
|
202
216
|
/** Whether the "Gifts" tab should be shown */
|
|
203
217
|
get showGifts() {
|
|
204
218
|
return this.full.displayGiftsButton;
|
|
@@ -113,6 +113,16 @@ export declare class FullUser extends User {
|
|
|
113
113
|
* TTL of all messages in this chat, in seconds
|
|
114
114
|
*/
|
|
115
115
|
get ttlPeriod(): number | null;
|
|
116
|
+
/**
|
|
117
|
+
* Whether the current user has enabled content protection for own messages in DMs with this user,
|
|
118
|
+
* i.e. our outgoing messages to this user will be `noforwards`.
|
|
119
|
+
*/
|
|
120
|
+
get contentProtectionOutgoing(): boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Whether this user has enabled content protection for their messages in DMs with the current user,
|
|
123
|
+
* i.e. our incoming messages from this user will be `noforwards`.
|
|
124
|
+
*/
|
|
125
|
+
get contentProtectionIncoming(): boolean;
|
|
116
126
|
/** Whether the "Gifts" tab should be shown */
|
|
117
127
|
get showGifts(): boolean;
|
|
118
128
|
/** Information about the user's gift receive settings */
|
|
@@ -113,6 +113,16 @@ export declare class FullUser extends User {
|
|
|
113
113
|
* TTL of all messages in this chat, in seconds
|
|
114
114
|
*/
|
|
115
115
|
get ttlPeriod(): number | null;
|
|
116
|
+
/**
|
|
117
|
+
* Whether the current user has enabled content protection for own messages in DMs with this user,
|
|
118
|
+
* i.e. our outgoing messages to this user will be `noforwards`.
|
|
119
|
+
*/
|
|
120
|
+
get contentProtectionOutgoing(): boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Whether this user has enabled content protection for their messages in DMs with the current user,
|
|
123
|
+
* i.e. our incoming messages from this user will be `noforwards`.
|
|
124
|
+
*/
|
|
125
|
+
get contentProtectionIncoming(): boolean;
|
|
116
126
|
/** Whether the "Gifts" tab should be shown */
|
|
117
127
|
get showGifts(): boolean;
|
|
118
128
|
/** Information about the user's gift receive settings */
|
|
@@ -192,6 +192,20 @@ class FullUser extends User$2 {
|
|
|
192
192
|
get ttlPeriod() {
|
|
193
193
|
return this.full?.ttlPeriod ?? null;
|
|
194
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* Whether the current user has enabled content protection for own messages in DMs with this user,
|
|
197
|
+
* i.e. our outgoing messages to this user will be `noforwards`.
|
|
198
|
+
*/
|
|
199
|
+
get contentProtectionOutgoing() {
|
|
200
|
+
return this.full.noforwardsMyEnabled;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Whether this user has enabled content protection for their messages in DMs with the current user,
|
|
204
|
+
* i.e. our incoming messages from this user will be `noforwards`.
|
|
205
|
+
*/
|
|
206
|
+
get contentProtectionIncoming() {
|
|
207
|
+
return this.full.noforwardsPeerEnabled;
|
|
208
|
+
}
|
|
195
209
|
/** Whether the "Gifts" tab should be shown */
|
|
196
210
|
get showGifts() {
|
|
197
211
|
return this.full.displayGiftsButton;
|
|
@@ -5,16 +5,26 @@ if (typeof globalThis !== "undefined" && !globalThis._MTCUTE_CJS_DEPRECATION_WAR
|
|
|
5
5
|
}
|
|
6
6
|
"use strict";
|
|
7
7
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
8
|
+
const utils = require("@fuman/utils");
|
|
8
9
|
const chat = require("./chat.cjs");
|
|
9
10
|
const user = require("./user.cjs");
|
|
10
11
|
function parsePeer(peer, index) {
|
|
11
12
|
switch (peer._) {
|
|
12
13
|
case "peerUser":
|
|
13
|
-
return new user.User(index.user(peer.userId));
|
|
14
|
+
return new user.User(utils.asNonNull(index).user(peer.userId));
|
|
14
15
|
case "peerChat":
|
|
15
|
-
return new chat.Chat(index.chat(peer.chatId));
|
|
16
|
+
return new chat.Chat(utils.asNonNull(index).chat(peer.chatId));
|
|
16
17
|
case "peerChannel":
|
|
17
|
-
return new chat.Chat(index.chat(peer.channelId));
|
|
18
|
+
return new chat.Chat(utils.asNonNull(index).chat(peer.channelId));
|
|
19
|
+
case "channel":
|
|
20
|
+
case "channelForbidden":
|
|
21
|
+
case "chat":
|
|
22
|
+
case "chatForbidden":
|
|
23
|
+
return new chat.Chat(peer);
|
|
24
|
+
case "user":
|
|
25
|
+
return new user.User(peer);
|
|
26
|
+
default:
|
|
27
|
+
throw new Error("Empty peer");
|
|
18
28
|
}
|
|
19
29
|
}
|
|
20
30
|
exports.parsePeer = parsePeer;
|
|
@@ -46,3 +46,7 @@ export type PeerSender = Peer | AnonymousSender;
|
|
|
46
46
|
* Given a `tl.TypePeer`, return a {@link Peer} object ({@link User} or {@link Chat})
|
|
47
47
|
*/
|
|
48
48
|
export declare function parsePeer(peer: tl.TypePeer, index: PeersIndex): Peer;
|
|
49
|
+
/**
|
|
50
|
+
* Given a `tl.TypeUser | tl.TypeChat`, return a {@link Peer} object ({@link User} or {@link Chat})
|
|
51
|
+
*/
|
|
52
|
+
export declare function parsePeer(peer: tl.TypeUser | tl.TypeChat): Peer;
|
|
@@ -46,3 +46,7 @@ export type PeerSender = Peer | AnonymousSender;
|
|
|
46
46
|
* Given a `tl.TypePeer`, return a {@link Peer} object ({@link User} or {@link Chat})
|
|
47
47
|
*/
|
|
48
48
|
export declare function parsePeer(peer: tl.TypePeer, index: PeersIndex): Peer;
|
|
49
|
+
/**
|
|
50
|
+
* Given a `tl.TypeUser | tl.TypeChat`, return a {@link Peer} object ({@link User} or {@link Chat})
|
|
51
|
+
*/
|
|
52
|
+
export declare function parsePeer(peer: tl.TypeUser | tl.TypeChat): Peer;
|
|
@@ -1,13 +1,23 @@
|
|
|
1
|
+
import { asNonNull } from "@fuman/utils";
|
|
1
2
|
import { Chat as Chat$2 } from "./chat.js";
|
|
2
3
|
import { User as User$2 } from "./user.js";
|
|
3
4
|
function parsePeer(peer, index) {
|
|
4
5
|
switch (peer._) {
|
|
5
6
|
case "peerUser":
|
|
6
|
-
return new User$2(index.user(peer.userId));
|
|
7
|
+
return new User$2(asNonNull(index).user(peer.userId));
|
|
7
8
|
case "peerChat":
|
|
8
|
-
return new Chat$2(index.chat(peer.chatId));
|
|
9
|
+
return new Chat$2(asNonNull(index).chat(peer.chatId));
|
|
9
10
|
case "peerChannel":
|
|
10
|
-
return new Chat$2(index.chat(peer.channelId));
|
|
11
|
+
return new Chat$2(asNonNull(index).chat(peer.channelId));
|
|
12
|
+
case "channel":
|
|
13
|
+
case "channelForbidden":
|
|
14
|
+
case "chat":
|
|
15
|
+
case "chatForbidden":
|
|
16
|
+
return new Chat$2(peer);
|
|
17
|
+
case "user":
|
|
18
|
+
return new User$2(peer);
|
|
19
|
+
default:
|
|
20
|
+
throw new Error("Empty peer");
|
|
11
21
|
}
|
|
12
22
|
}
|
|
13
23
|
export {
|
|
@@ -14,6 +14,8 @@ const earlyTimer = require("../../utils/early-timer.cjs");
|
|
|
14
14
|
const peerUtils = require("../../utils/peer-utils.cjs");
|
|
15
15
|
const sortedArray = require("../../utils/sorted-array.cjs");
|
|
16
16
|
require("@mtcute/tl-runtime");
|
|
17
|
+
require("@mtcute/tl/binary/reader.js");
|
|
18
|
+
require("@mtcute/tl/binary/writer.js");
|
|
17
19
|
const batchedQueries = require("../methods/chats/batched-queries.cjs");
|
|
18
20
|
const peersIndex = require("../types/peers/peers-index.cjs");
|
|
19
21
|
const types = require("./types.cjs");
|
|
@@ -7,6 +7,8 @@ import { EarlyTimer } from "../../utils/early-timer.js";
|
|
|
7
7
|
import { toggleChannelIdMark, parseMarkedPeerId, getBarePeerId, getMarkedPeerId } from "../../utils/peer-utils.js";
|
|
8
8
|
import { SortedArray } from "../../utils/sorted-array.js";
|
|
9
9
|
import "@mtcute/tl-runtime";
|
|
10
|
+
import "@mtcute/tl/binary/reader.js";
|
|
11
|
+
import "@mtcute/tl/binary/writer.js";
|
|
10
12
|
import { _getChannelsBatched, _getUsersBatched } from "../methods/chats/batched-queries.js";
|
|
11
13
|
import { PeersIndex } from "../types/peers/peers-index.js";
|
|
12
14
|
import { RawUpdateInfo } from "./types.js";
|
|
@@ -7,11 +7,11 @@ if (typeof globalThis !== "undefined" && !globalThis._MTCUTE_CJS_DEPRECATION_WAR
|
|
|
7
7
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
8
8
|
const utils = require("@fuman/utils");
|
|
9
9
|
const errors = require("../../types/errors.cjs");
|
|
10
|
-
function determinePartSize(fileSize) {
|
|
10
|
+
function determinePartSize(fileSize, forUpload = false) {
|
|
11
11
|
if (fileSize <= 262078465) return 128;
|
|
12
12
|
if (fileSize <= 786432e3) return 256;
|
|
13
13
|
if (fileSize <= 2097152e3) return 512;
|
|
14
|
-
return 1024;
|
|
14
|
+
return forUpload ? 512 : 1024;
|
|
15
15
|
}
|
|
16
16
|
function isProbablyPlainText(buf) {
|
|
17
17
|
return !buf.some(
|
|
@@ -3,7 +3,7 @@ import { tl } from '@mtcute/tl';
|
|
|
3
3
|
* Given file size, determine the appropriate chunk size (in KB)
|
|
4
4
|
* for upload/download operations.
|
|
5
5
|
*/
|
|
6
|
-
export declare function determinePartSize(fileSize: number): number;
|
|
6
|
+
export declare function determinePartSize(fileSize: number, forUpload?: boolean): number;
|
|
7
7
|
/**
|
|
8
8
|
* Returns `true` if all bytes in `buf` are printable ASCII characters
|
|
9
9
|
*/
|
|
@@ -3,7 +3,7 @@ import { tl } from '@mtcute/tl';
|
|
|
3
3
|
* Given file size, determine the appropriate chunk size (in KB)
|
|
4
4
|
* for upload/download operations.
|
|
5
5
|
*/
|
|
6
|
-
export declare function determinePartSize(fileSize: number): number;
|
|
6
|
+
export declare function determinePartSize(fileSize: number, forUpload?: boolean): number;
|
|
7
7
|
/**
|
|
8
8
|
* Returns `true` if all bytes in `buf` are printable ASCII characters
|
|
9
9
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { u8, utf8, hex } from "@fuman/utils";
|
|
2
2
|
import { MtArgumentError } from "../../types/errors.js";
|
|
3
|
-
function determinePartSize(fileSize) {
|
|
3
|
+
function determinePartSize(fileSize, forUpload = false) {
|
|
4
4
|
if (fileSize <= 262078465) return 128;
|
|
5
5
|
if (fileSize <= 786432e3) return 256;
|
|
6
6
|
if (fileSize <= 2097152e3) return 512;
|
|
7
|
-
return 1024;
|
|
7
|
+
return forUpload ? 512 : 1024;
|
|
8
8
|
}
|
|
9
9
|
function isProbablyPlainText(buf) {
|
|
10
10
|
return !buf.some(
|
package/methods.cjs
CHANGED
|
@@ -47,17 +47,20 @@ const deleteGroup = require("./highlevel/methods/chats/delete-group.cjs");
|
|
|
47
47
|
const deleteHistory = require("./highlevel/methods/chats/delete-history.cjs");
|
|
48
48
|
const deleteUserHistory = require("./highlevel/methods/chats/delete-user-history.cjs");
|
|
49
49
|
const editAdminRights = require("./highlevel/methods/chats/edit-admin-rights.cjs");
|
|
50
|
+
const editChatMemberRank = require("./highlevel/methods/chats/edit-chat-member-rank.cjs");
|
|
50
51
|
const getChatEventLog = require("./highlevel/methods/chats/get-chat-event-log.cjs");
|
|
51
52
|
const getChatMember = require("./highlevel/methods/chats/get-chat-member.cjs");
|
|
52
53
|
const getChatMembers = require("./highlevel/methods/chats/get-chat-members.cjs");
|
|
53
54
|
const getChatPreview = require("./highlevel/methods/chats/get-chat-preview.cjs");
|
|
54
55
|
const getChat = require("./highlevel/methods/chats/get-chat.cjs");
|
|
56
|
+
const getChats = require("./highlevel/methods/chats/get-chats.cjs");
|
|
55
57
|
const getCreatorAfterLeave = require("./highlevel/methods/chats/get-creator-after-leave.cjs");
|
|
56
58
|
const getFullChat = require("./highlevel/methods/chats/get-full-chat.cjs");
|
|
57
59
|
const getFullUser = require("./highlevel/methods/chats/get-full-user.cjs");
|
|
58
60
|
const getMessageAuthor = require("./highlevel/methods/chats/get-message-author.cjs");
|
|
59
61
|
const getNearbyChats = require("./highlevel/methods/chats/get-nearby-chats.cjs");
|
|
60
62
|
const getPeer = require("./highlevel/methods/chats/get-peer.cjs");
|
|
63
|
+
const getPeers = require("./highlevel/methods/chats/get-peers.cjs");
|
|
61
64
|
const getSimilarChannels = require("./highlevel/methods/chats/get-similar-channels.cjs");
|
|
62
65
|
const getUser = require("./highlevel/methods/chats/get-user.cjs");
|
|
63
66
|
const iterChatEventLog = require("./highlevel/methods/chats/iter-chat-event-log.cjs");
|
|
@@ -82,6 +85,7 @@ const toggleContentProtection = require("./highlevel/methods/chats/toggle-conten
|
|
|
82
85
|
const toggleFragmentUsername = require("./highlevel/methods/chats/toggle-fragment-username.cjs");
|
|
83
86
|
const toggleJoinRequests = require("./highlevel/methods/chats/toggle-join-requests.cjs");
|
|
84
87
|
const toggleJoinToSend = require("./highlevel/methods/chats/toggle-join-to-send.cjs");
|
|
88
|
+
const transferChatOwnership = require("./highlevel/methods/chats/transfer-chat-ownership.cjs");
|
|
85
89
|
const unarchiveChats = require("./highlevel/methods/chats/unarchive-chats.cjs");
|
|
86
90
|
const unbanChatMember = require("./highlevel/methods/chats/unban-chat-member.cjs");
|
|
87
91
|
const addContact = require("./highlevel/methods/contacts/add-contact.cjs");
|
|
@@ -327,17 +331,20 @@ exports.deleteGroup = deleteGroup.deleteGroup;
|
|
|
327
331
|
exports.deleteHistory = deleteHistory.deleteHistory;
|
|
328
332
|
exports.deleteUserHistory = deleteUserHistory.deleteUserHistory;
|
|
329
333
|
exports.editAdminRights = editAdminRights.editAdminRights;
|
|
334
|
+
exports.editChatMemberRank = editChatMemberRank.editChatMemberRank;
|
|
330
335
|
exports.getChatEventLog = getChatEventLog.getChatEventLog;
|
|
331
336
|
exports.getChatMember = getChatMember.getChatMember;
|
|
332
337
|
exports.getChatMembers = getChatMembers.getChatMembers;
|
|
333
338
|
exports.getChatPreview = getChatPreview.getChatPreview;
|
|
334
339
|
exports.getChat = getChat.getChat;
|
|
340
|
+
exports.getChats = getChats.getChats;
|
|
335
341
|
exports.getCreatorAfterLeave = getCreatorAfterLeave.getCreatorAfterLeave;
|
|
336
342
|
exports.getFullChat = getFullChat.getFullChat;
|
|
337
343
|
exports.getFullUser = getFullUser.getFullUser;
|
|
338
344
|
exports.getMessageAuthor = getMessageAuthor.getMessageAuthor;
|
|
339
345
|
exports.getNearbyChats = getNearbyChats.getNearbyChats;
|
|
340
346
|
exports.getPeer = getPeer.getPeer;
|
|
347
|
+
exports.getPeers = getPeers.getPeers;
|
|
341
348
|
exports.getSimilarChannels = getSimilarChannels.getSimilarChannels;
|
|
342
349
|
exports.getUser = getUser.getUser;
|
|
343
350
|
exports.iterChatEventLog = iterChatEventLog.iterChatEventLog;
|
|
@@ -363,6 +370,7 @@ exports.toggleContentProtection = toggleContentProtection.toggleContentProtectio
|
|
|
363
370
|
exports.toggleFragmentUsername = toggleFragmentUsername.toggleFragmentUsername;
|
|
364
371
|
exports.toggleJoinRequests = toggleJoinRequests.toggleJoinRequests;
|
|
365
372
|
exports.toggleJoinToSend = toggleJoinToSend.toggleJoinToSend;
|
|
373
|
+
exports.transferChatOwnership = transferChatOwnership.transferChatOwnership;
|
|
366
374
|
exports.unarchiveChats = unarchiveChats.unarchiveChats;
|
|
367
375
|
exports.unbanChatMember = unbanChatMember.unbanChatMember;
|
|
368
376
|
exports.addContact = addContact.addContact;
|