@mtkruto/node 0.191.0 → 0.192.0
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/esm/3_types.d.ts +4 -3
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +4 -3
- package/esm/client/0_params.d.ts +10 -0
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/1_client_generic.d.ts +34 -5
- package/esm/client/1_client_generic.d.ts.map +1 -1
- package/esm/client/3_secret_chat_manager.d.ts +4 -3
- package/esm/client/3_secret_chat_manager.d.ts.map +1 -1
- package/esm/client/3_secret_chat_manager.js +17 -60
- package/esm/client/4_context.d.ts +8 -4
- package/esm/client/4_context.d.ts.map +1 -1
- package/esm/client/4_context.js +15 -5
- package/esm/client/4_forum_manager.d.ts +4 -1
- package/esm/client/4_forum_manager.d.ts.map +1 -1
- package/esm/client/4_forum_manager.js +33 -1
- package/esm/client/6_client.d.ts +34 -5
- package/esm/client/6_client.d.ts.map +1 -1
- package/esm/client/6_client.js +41 -4
- package/esm/client/6_client_dispatcher.d.ts +34 -5
- package/esm/client/6_client_dispatcher.d.ts.map +1 -1
- package/esm/client/6_client_dispatcher.js +41 -4
- package/esm/types/0_report_reason.d.ts +1 -0
- package/esm/types/0_report_reason.d.ts.map +1 -1
- package/esm/types/0_story_report_option.d.ts +3 -0
- package/esm/types/0_story_report_option.d.ts.map +1 -1
- package/esm/types/1_story_report_result.d.ts +17 -3
- package/esm/types/1_story_report_result.d.ts.map +1 -1
- package/esm/types/2_secret_message.d.ts +1 -0
- package/esm/types/2_secret_message.d.ts.map +1 -1
- package/esm/types/3_bot_access_settings.d.ts +3 -0
- package/esm/types/3_bot_access_settings.d.ts.map +1 -1
- package/esm/types/3_connected_website.d.ts +10 -0
- package/esm/types/3_connected_website.d.ts.map +1 -1
- package/esm/types/3_poll_voter_list.d.ts +1 -0
- package/esm/types/3_poll_voter_list.d.ts.map +1 -1
- package/esm/types/3_text_to_translate.d.ts +3 -0
- package/esm/types/3_text_to_translate.d.ts.map +1 -1
- package/esm/types/3_translated_text.d.ts +3 -0
- package/esm/types/3_translated_text.d.ts.map +1 -1
- package/esm/types/A_topic.d.ts +20 -3
- package/esm/types/A_topic.d.ts.map +1 -1
- package/esm/types/A_topic.js +37 -0
- package/esm/types/B_topic_list_item.d.ts +7 -0
- package/esm/types/B_topic_list_item.d.ts.map +1 -0
- package/esm/types/B_topic_list_item.js +1 -0
- package/esm/types/B_update.d.ts +16 -16
- package/esm/types/B_update.d.ts.map +1 -1
- package/esm/types/C_topic_list.d.ts +14 -0
- package/esm/types/C_topic_list.d.ts.map +1 -0
- package/esm/types/C_topic_list.js +9 -0
- package/package.json +1 -1
- package/script/3_types.d.ts +4 -3
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +4 -3
- package/script/client/0_params.d.ts +10 -0
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/1_client_generic.d.ts +34 -5
- package/script/client/1_client_generic.d.ts.map +1 -1
- package/script/client/3_secret_chat_manager.d.ts +4 -3
- package/script/client/3_secret_chat_manager.d.ts.map +1 -1
- package/script/client/3_secret_chat_manager.js +16 -59
- package/script/client/4_context.d.ts +8 -4
- package/script/client/4_context.d.ts.map +1 -1
- package/script/client/4_context.js +15 -5
- package/script/client/4_forum_manager.d.ts +4 -1
- package/script/client/4_forum_manager.d.ts.map +1 -1
- package/script/client/4_forum_manager.js +32 -0
- package/script/client/6_client.d.ts +34 -5
- package/script/client/6_client.d.ts.map +1 -1
- package/script/client/6_client.js +41 -4
- package/script/client/6_client_dispatcher.d.ts +34 -5
- package/script/client/6_client_dispatcher.d.ts.map +1 -1
- package/script/client/6_client_dispatcher.js +41 -4
- package/script/types/0_report_reason.d.ts +1 -0
- package/script/types/0_report_reason.d.ts.map +1 -1
- package/script/types/0_story_report_option.d.ts +3 -0
- package/script/types/0_story_report_option.d.ts.map +1 -1
- package/script/types/1_story_report_result.d.ts +17 -3
- package/script/types/1_story_report_result.d.ts.map +1 -1
- package/script/types/2_secret_message.d.ts +1 -0
- package/script/types/2_secret_message.d.ts.map +1 -1
- package/script/types/3_bot_access_settings.d.ts +3 -0
- package/script/types/3_bot_access_settings.d.ts.map +1 -1
- package/script/types/3_connected_website.d.ts +10 -0
- package/script/types/3_connected_website.d.ts.map +1 -1
- package/script/types/3_poll_voter_list.d.ts +1 -0
- package/script/types/3_poll_voter_list.d.ts.map +1 -1
- package/script/types/3_text_to_translate.d.ts +3 -0
- package/script/types/3_text_to_translate.d.ts.map +1 -1
- package/script/types/3_translated_text.d.ts +3 -0
- package/script/types/3_translated_text.d.ts.map +1 -1
- package/script/types/A_topic.d.ts +20 -3
- package/script/types/A_topic.d.ts.map +1 -1
- package/script/types/A_topic.js +38 -0
- package/script/types/B_topic_list_item.d.ts +7 -0
- package/script/types/B_topic_list_item.d.ts.map +1 -0
- package/script/types/B_topic_list_item.js +2 -0
- package/script/types/B_update.d.ts +16 -16
- package/script/types/B_update.d.ts.map +1 -1
- package/script/types/C_topic_list.d.ts +14 -0
- package/script/types/C_topic_list.d.ts.map +1 -0
- package/script/types/C_topic_list.js +12 -0
- package/esm/types/1_secret_chat_action.d.ts +0 -30
- package/esm/types/1_secret_chat_action.d.ts.map +0 -1
- package/esm/types/1_secret_chat_action.js +0 -28
- package/script/types/1_secret_chat_action.d.ts +0 -30
- package/script/types/1_secret_chat_action.d.ts.map +0 -1
- package/script/types/1_secret_chat_action.js +0 -31
package/script/types/A_topic.js
CHANGED
|
@@ -20,8 +20,10 @@
|
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.constructTopic = constructTopic;
|
|
23
|
+
exports.constructTopic2 = constructTopic2;
|
|
23
24
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
25
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
26
|
+
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
27
|
function constructTopic(message) {
|
|
26
28
|
let forumTopicCreated;
|
|
27
29
|
let forumTopicEdited;
|
|
@@ -51,6 +53,7 @@ function constructTopic(message) {
|
|
|
51
53
|
customEmojiId = forumTopicEdited.forumTopicEdited.customEmojiId;
|
|
52
54
|
}
|
|
53
55
|
return (0, _1_utilities_js_1.cleanObject)({
|
|
56
|
+
type: "active",
|
|
54
57
|
id,
|
|
55
58
|
date,
|
|
56
59
|
creator: creator,
|
|
@@ -60,5 +63,40 @@ function constructTopic(message) {
|
|
|
60
63
|
name,
|
|
61
64
|
color,
|
|
62
65
|
customEmojiId,
|
|
66
|
+
isDeleted: false,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function constructTopic2(ft, getPeer) {
|
|
70
|
+
if (_2_tl_js_1.Api.is("forumTopicDeleted", ft)) {
|
|
71
|
+
return {
|
|
72
|
+
type: "deleted",
|
|
73
|
+
id: ft.id,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
const peer = getPeer(ft.from_id);
|
|
77
|
+
if (peer === null) {
|
|
78
|
+
(0, _0_deps_js_1.unreachable)();
|
|
79
|
+
}
|
|
80
|
+
const id = ft.id;
|
|
81
|
+
const date = ft.date;
|
|
82
|
+
const creator = peer[0];
|
|
83
|
+
const isGeneral = id === 1;
|
|
84
|
+
const isClosed = !!ft.closed;
|
|
85
|
+
const isHidden = !!ft.hidden;
|
|
86
|
+
const name = ft.title;
|
|
87
|
+
const color = ft.icon_color;
|
|
88
|
+
const customEmojiId = ft.icon_emoji_id ? String(ft.icon_emoji_id) : undefined;
|
|
89
|
+
return (0, _1_utilities_js_1.cleanObject)({
|
|
90
|
+
type: "active",
|
|
91
|
+
id,
|
|
92
|
+
date,
|
|
93
|
+
creator,
|
|
94
|
+
isGeneral,
|
|
95
|
+
isClosed,
|
|
96
|
+
isHidden,
|
|
97
|
+
name,
|
|
98
|
+
color,
|
|
99
|
+
customEmojiId,
|
|
100
|
+
isDeleted: false,
|
|
63
101
|
});
|
|
64
102
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"B_topic_list_item.d.ts","sourceRoot":"","sources":["../../src/types/B_topic_list_item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
|
|
@@ -30,7 +30,6 @@ import type { VideoChat } from "./0_video_chat.js";
|
|
|
30
30
|
import type { VoiceTranscription } from "./0_voice_transcription.js";
|
|
31
31
|
import type { BotCommands } from "./1_bot_commands.js";
|
|
32
32
|
import type { ChatAction } from "./1_chat_action.js";
|
|
33
|
-
import type { SecretChatAction } from "./1_secret_chat_action.js";
|
|
34
33
|
import type { MessageInteractions } from "./2_message_interactions.js";
|
|
35
34
|
import type { MessageReactionCount } from "./2_message_reaction_count.js";
|
|
36
35
|
import type { PollAnswer } from "./2_poll_answer.js";
|
|
@@ -531,20 +530,6 @@ export interface UpdateChatAction {
|
|
|
531
530
|
type: "chatAction";
|
|
532
531
|
chatAction: ChatAction;
|
|
533
532
|
}
|
|
534
|
-
/**
|
|
535
|
-
* A participant of a secret chat made an action.
|
|
536
|
-
*
|
|
537
|
-
* ```
|
|
538
|
-
* client.on("secretChatAction", (ctx) => {
|
|
539
|
-
* // ctx.update.secretChatAction
|
|
540
|
-
* });
|
|
541
|
-
* ```
|
|
542
|
-
* @unlisted
|
|
543
|
-
*/
|
|
544
|
-
export interface UpdateSecretChatAction {
|
|
545
|
-
type: "secretChatAction";
|
|
546
|
-
secretChatAction: SecretChatAction;
|
|
547
|
-
}
|
|
548
533
|
/**
|
|
549
534
|
* A message draft was received. User-only.
|
|
550
535
|
*
|
|
@@ -587,6 +572,21 @@ export interface UpdateSecretMessage {
|
|
|
587
572
|
type: "secretMessage";
|
|
588
573
|
secretMessage: SecretMessage;
|
|
589
574
|
}
|
|
575
|
+
/**
|
|
576
|
+
* The other participant of a secret chat is currently typing. User-only.
|
|
577
|
+
*
|
|
578
|
+
* ```
|
|
579
|
+
* client.on("secretTyping", (ctx) => {
|
|
580
|
+
* // ctx.update.secretTyping
|
|
581
|
+
* });
|
|
582
|
+
* ```
|
|
583
|
+
* @unlisted
|
|
584
|
+
*/
|
|
585
|
+
export interface UpdateSecretTyping {
|
|
586
|
+
type: "secretTyping";
|
|
587
|
+
/** The identifier of the secret chat. */
|
|
588
|
+
chatId: number;
|
|
589
|
+
}
|
|
590
590
|
/** An incoming update. */
|
|
591
|
-
export type Update = UpdateConnectionState | UpdateAuthorizationState | UpdateLowLevel | UpdateNewMessage | UpdateMessageEdited | UpdateMessageScheduled | UpdateMessagesDeleted | UpdateCallbackQuery | UpdateInlineQuery | UpdateGuestQuery | UpdateChosenInlineResult | UpdateNewChat | UpdateEditedChat | UpdateDeletedChat | UpdateMessageInteractions | UpdateMessageReactionCount | UpdateMessageReactions | UpdateChatMember | UpdateMyChatMember | UpdateDeletedStory | UpdateNewStory | UpdateBusinessConnection | UpdateVideoChat | UpdatePreCheckoutQuery | UpdateJoinRequest | UpdateTranslations | UpdatePoll | UpdatePollAnswer | UpdateVoiceTranscription | UpdateLinkPreview | UpdateUploadProgress | UpdateBotCommands | UpdateEmojiStatus | UpdateEmojiStatusRemoved | UpdateChatAction |
|
|
591
|
+
export type Update = UpdateConnectionState | UpdateAuthorizationState | UpdateLowLevel | UpdateNewMessage | UpdateMessageEdited | UpdateMessageScheduled | UpdateMessagesDeleted | UpdateCallbackQuery | UpdateInlineQuery | UpdateGuestQuery | UpdateChosenInlineResult | UpdateNewChat | UpdateEditedChat | UpdateDeletedChat | UpdateMessageInteractions | UpdateMessageReactionCount | UpdateMessageReactions | UpdateChatMember | UpdateMyChatMember | UpdateDeletedStory | UpdateNewStory | UpdateBusinessConnection | UpdateVideoChat | UpdatePreCheckoutQuery | UpdateJoinRequest | UpdateTranslations | UpdatePoll | UpdatePollAnswer | UpdateVoiceTranscription | UpdateLinkPreview | UpdateUploadProgress | UpdateBotCommands | UpdateEmojiStatus | UpdateEmojiStatusRemoved | UpdateChatAction | UpdateMessageDraft | UpdateSecretChat | UpdateSecretMessage | UpdateSecretTyping;
|
|
592
592
|
//# sourceMappingURL=B_update.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"B_update.d.ts","sourceRoot":"","sources":["../../src/types/B_update.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"B_update.d.ts","sourceRoot":"","sources":["../../src/types/B_update.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAE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GAClB,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Api } from "../2_tl.js";
|
|
2
|
+
import type { PeerGetter } from "./1_chat_p.js";
|
|
3
|
+
import type { Message } from "./9_message.js";
|
|
4
|
+
import type { TopicListItem } from "./B_topic_list_item.js";
|
|
5
|
+
export interface TopicList {
|
|
6
|
+
/** The items in this list. */
|
|
7
|
+
items: TopicListItem[];
|
|
8
|
+
/** Whether the items should be ordered by creation date. */
|
|
9
|
+
isOrderedByCreationDate: boolean;
|
|
10
|
+
/** The total number of items. */
|
|
11
|
+
count: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function constructTopicList(result: Api.messages_forumTopics, messages: Message[], getPeer: PeerGetter): TopicList;
|
|
14
|
+
//# sourceMappingURL=C_topic_list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"C_topic_list.d.ts","sourceRoot":"","sources":["../../src/types/C_topic_list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,WAAW,SAAS;IACxB,8BAA8B;IAC9B,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,4DAA4D;IAC5D,uBAAuB,EAAE,OAAO,CAAC;IACjC,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,GAAG,CAAC,oBAAoB,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,GAAG,SAAS,CAKxH"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.constructTopicList = constructTopicList;
|
|
4
|
+
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
5
|
+
const _2_tl_js_1 = require("../2_tl.js");
|
|
6
|
+
const A_topic_js_1 = require("./A_topic.js");
|
|
7
|
+
function constructTopicList(result, messages, getPeer) {
|
|
8
|
+
const items = result.topics.map((v) => ({ topic: (0, A_topic_js_1.constructTopic2)(v, getPeer), lastMessage: messages.find((m) => _2_tl_js_1.Api.is("forumTopic", v) ? m.id === v.top_message : false) })).map(_1_utilities_js_1.cleanObject);
|
|
9
|
+
const count = result.count;
|
|
10
|
+
const isOrderedByCreationDate = !!result.order_by_create_date;
|
|
11
|
+
return { items, isOrderedByCreationDate, count };
|
|
12
|
+
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
-
* Copyright (C) 2023-2026 Roj <https://roj.im/>
|
|
4
|
-
*
|
|
5
|
-
* This file is part of MTKruto.
|
|
6
|
-
*
|
|
7
|
-
* This program is free software: you can redistribute it and/or modify
|
|
8
|
-
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
-
* (at your option) any later version.
|
|
11
|
-
*
|
|
12
|
-
* This program is distributed in the hope that it will be useful,
|
|
13
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
-
* GNU Lesser General Public License for more details.
|
|
16
|
-
*
|
|
17
|
-
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
-
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
-
*/
|
|
20
|
-
import type { SecretChats } from "../2_tl.js";
|
|
21
|
-
import type { ChatActionType } from "./0_chat_action_type.js";
|
|
22
|
-
/** A sign of a possible action by a member of a secret chat. */
|
|
23
|
-
export interface SecretChatAction {
|
|
24
|
-
/** The type of the action. */
|
|
25
|
-
type: ChatActionType;
|
|
26
|
-
/** The identifier of the secret chat that the chat action belongs to. */
|
|
27
|
-
chatId: number;
|
|
28
|
-
}
|
|
29
|
-
export declare function constructSecretChatAction(chatId: number, update: SecretChats.decryptedMessageActionTyping): SecretChatAction | null;
|
|
30
|
-
//# sourceMappingURL=1_secret_chat_action.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"1_secret_chat_action.d.ts","sourceRoot":"","sources":["../../src/types/1_secret_chat_action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG9D,gEAAgE;AAChE,MAAM,WAAW,gBAAgB;IAC/B,8BAA8B;IAC9B,IAAI,EAAE,cAAc,CAAC;IACrB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,4BAA4B,GAAG,gBAAgB,GAAG,IAAI,CAOnI"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
-
* Copyright (C) 2023-2026 Roj <https://roj.im/>
|
|
4
|
-
*
|
|
5
|
-
* This file is part of MTKruto.
|
|
6
|
-
*
|
|
7
|
-
* This program is free software: you can redistribute it and/or modify
|
|
8
|
-
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
-
* (at your option) any later version.
|
|
11
|
-
*
|
|
12
|
-
* This program is distributed in the hope that it will be useful,
|
|
13
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
-
* GNU Lesser General Public License for more details.
|
|
16
|
-
*
|
|
17
|
-
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
-
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
-
*/
|
|
20
|
-
import { cleanObject } from "../1_utilities.js";
|
|
21
|
-
import { constructSecretChatActionType } from "./0_secret_chat_action_type.js";
|
|
22
|
-
export function constructSecretChatAction(chatId, update) {
|
|
23
|
-
const type = constructSecretChatActionType(update.action);
|
|
24
|
-
if (type === null) {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
return cleanObject({ type, chatId });
|
|
28
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
-
* Copyright (C) 2023-2026 Roj <https://roj.im/>
|
|
4
|
-
*
|
|
5
|
-
* This file is part of MTKruto.
|
|
6
|
-
*
|
|
7
|
-
* This program is free software: you can redistribute it and/or modify
|
|
8
|
-
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
-
* (at your option) any later version.
|
|
11
|
-
*
|
|
12
|
-
* This program is distributed in the hope that it will be useful,
|
|
13
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
-
* GNU Lesser General Public License for more details.
|
|
16
|
-
*
|
|
17
|
-
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
-
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
-
*/
|
|
20
|
-
import type { SecretChats } from "../2_tl.js";
|
|
21
|
-
import type { ChatActionType } from "./0_chat_action_type.js";
|
|
22
|
-
/** A sign of a possible action by a member of a secret chat. */
|
|
23
|
-
export interface SecretChatAction {
|
|
24
|
-
/** The type of the action. */
|
|
25
|
-
type: ChatActionType;
|
|
26
|
-
/** The identifier of the secret chat that the chat action belongs to. */
|
|
27
|
-
chatId: number;
|
|
28
|
-
}
|
|
29
|
-
export declare function constructSecretChatAction(chatId: number, update: SecretChats.decryptedMessageActionTyping): SecretChatAction | null;
|
|
30
|
-
//# sourceMappingURL=1_secret_chat_action.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"1_secret_chat_action.d.ts","sourceRoot":"","sources":["../../src/types/1_secret_chat_action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG9D,gEAAgE;AAChE,MAAM,WAAW,gBAAgB;IAC/B,8BAA8B;IAC9B,IAAI,EAAE,cAAc,CAAC;IACrB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,4BAA4B,GAAG,gBAAgB,GAAG,IAAI,CAOnI"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
4
|
-
* Copyright (C) 2023-2026 Roj <https://roj.im/>
|
|
5
|
-
*
|
|
6
|
-
* This file is part of MTKruto.
|
|
7
|
-
*
|
|
8
|
-
* This program is free software: you can redistribute it and/or modify
|
|
9
|
-
* it under the terms of the GNU Lesser General Public License as published by
|
|
10
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
-
* (at your option) any later version.
|
|
12
|
-
*
|
|
13
|
-
* This program is distributed in the hope that it will be useful,
|
|
14
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
* GNU Lesser General Public License for more details.
|
|
17
|
-
*
|
|
18
|
-
* You should have received a copy of the GNU Lesser General Public License
|
|
19
|
-
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
|
-
*/
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructSecretChatAction = constructSecretChatAction;
|
|
23
|
-
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
|
-
const _0_secret_chat_action_type_js_1 = require("./0_secret_chat_action_type.js");
|
|
25
|
-
function constructSecretChatAction(chatId, update) {
|
|
26
|
-
const type = (0, _0_secret_chat_action_type_js_1.constructSecretChatActionType)(update.action);
|
|
27
|
-
if (type === null) {
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
return (0, _1_utilities_js_1.cleanObject)({ type, chatId });
|
|
31
|
-
}
|