@mtkruto/node 0.104.0 → 0.106.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/client/0_html.d.ts +1 -1
- package/esm/client/0_html.d.ts.map +1 -1
- package/esm/client/0_html.js +34 -46
- package/esm/client/0_markdown.d.ts.map +1 -1
- package/esm/client/0_markdown.js +21 -0
- package/esm/client/0_params.d.ts +7 -1
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/0_utilities.d.ts +1 -1
- package/esm/client/0_utilities.d.ts.map +1 -1
- package/esm/client/1_client_generic.d.ts +9 -1
- package/esm/client/1_client_generic.d.ts.map +1 -1
- package/esm/client/2_context.d.ts +25 -17
- package/esm/client/2_context.d.ts.map +1 -1
- package/esm/client/2_context.js +18 -0
- package/esm/client/4_chat_manager.d.ts +2 -1
- package/esm/client/4_chat_manager.d.ts.map +1 -1
- package/esm/client/4_chat_manager.js +8 -2
- package/esm/client/5_client.d.ts +9 -1
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +10 -0
- package/esm/client/5_client_dispatcher.d.ts +9 -1
- package/esm/client/5_client_dispatcher.d.ts.map +1 -1
- package/esm/client/5_client_dispatcher.js +10 -0
- package/esm/tl/1_telegram_api.d.ts +105 -20
- package/esm/tl/1_telegram_api.d.ts.map +1 -1
- package/esm/tl/1_telegram_api.js +143 -38
- package/esm/types/0_chat_administrator_rights.d.ts +2 -0
- package/esm/types/0_chat_administrator_rights.d.ts.map +1 -1
- package/esm/types/0_chat_administrator_rights.js +2 -0
- package/esm/types/2_chat_member.d.ts.map +1 -1
- package/esm/types/2_chat_member.js +3 -2
- package/esm/types/2_message_entity.d.ts +11 -2
- package/esm/types/2_message_entity.d.ts.map +1 -1
- package/esm/types/2_message_entity.js +60 -0
- package/esm/types/6_message.d.ts +3 -1
- package/esm/types/6_message.d.ts.map +1 -1
- package/esm/types/6_message.js +3 -0
- package/package.json +1 -1
- package/script/client/0_html.d.ts +1 -1
- package/script/client/0_html.d.ts.map +1 -1
- package/script/client/0_html.js +34 -46
- package/script/client/0_markdown.d.ts.map +1 -1
- package/script/client/0_markdown.js +21 -0
- package/script/client/0_params.d.ts +7 -1
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/0_utilities.d.ts +1 -1
- package/script/client/0_utilities.d.ts.map +1 -1
- package/script/client/1_client_generic.d.ts +9 -1
- package/script/client/1_client_generic.d.ts.map +1 -1
- package/script/client/2_context.d.ts +25 -17
- package/script/client/2_context.d.ts.map +1 -1
- package/script/client/2_context.js +18 -0
- package/script/client/4_chat_manager.d.ts +2 -1
- package/script/client/4_chat_manager.d.ts.map +1 -1
- package/script/client/4_chat_manager.js +8 -2
- package/script/client/5_client.d.ts +9 -1
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +10 -0
- package/script/client/5_client_dispatcher.d.ts +9 -1
- package/script/client/5_client_dispatcher.d.ts.map +1 -1
- package/script/client/5_client_dispatcher.js +10 -0
- package/script/tl/1_telegram_api.d.ts +105 -20
- package/script/tl/1_telegram_api.d.ts.map +1 -1
- package/script/tl/1_telegram_api.js +143 -38
- package/script/types/0_chat_administrator_rights.d.ts +2 -0
- package/script/types/0_chat_administrator_rights.d.ts.map +1 -1
- package/script/types/0_chat_administrator_rights.js +2 -0
- package/script/types/2_chat_member.d.ts.map +1 -1
- package/script/types/2_chat_member.js +3 -2
- package/script/types/2_message_entity.d.ts +11 -2
- package/script/types/2_message_entity.d.ts.map +1 -1
- package/script/types/2_message_entity.js +60 -0
- package/script/types/6_message.d.ts +3 -1
- package/script/types/6_message.d.ts.map +1 -1
- package/script/types/6_message.js +3 -0
|
@@ -960,27 +960,33 @@ exports.schema = Object.freeze({
|
|
|
960
960
|
"ChatFull",
|
|
961
961
|
],
|
|
962
962
|
chatParticipant: [
|
|
963
|
-
|
|
963
|
+
0x38E79FDE,
|
|
964
964
|
[
|
|
965
|
+
["flags", "#"],
|
|
965
966
|
["user_id", "long"],
|
|
966
967
|
["inviter_id", "long"],
|
|
967
968
|
["date", "int"],
|
|
969
|
+
["rank", "flags.0?string"],
|
|
968
970
|
],
|
|
969
971
|
"ChatParticipant",
|
|
970
972
|
],
|
|
971
973
|
chatParticipantCreator: [
|
|
972
|
-
|
|
974
|
+
0xE1F867B8,
|
|
973
975
|
[
|
|
976
|
+
["flags", "#"],
|
|
974
977
|
["user_id", "long"],
|
|
978
|
+
["rank", "flags.0?string"],
|
|
975
979
|
],
|
|
976
980
|
"ChatParticipant",
|
|
977
981
|
],
|
|
978
982
|
chatParticipantAdmin: [
|
|
979
|
-
|
|
983
|
+
0x0360D5D2,
|
|
980
984
|
[
|
|
985
|
+
["flags", "#"],
|
|
981
986
|
["user_id", "long"],
|
|
982
987
|
["inviter_id", "long"],
|
|
983
988
|
["date", "int"],
|
|
989
|
+
["rank", "flags.0?string"],
|
|
984
990
|
],
|
|
985
991
|
"ChatParticipant",
|
|
986
992
|
],
|
|
@@ -1028,7 +1034,7 @@ exports.schema = Object.freeze({
|
|
|
1028
1034
|
"Message",
|
|
1029
1035
|
],
|
|
1030
1036
|
message: [
|
|
1031
|
-
|
|
1037
|
+
0x3AE56482,
|
|
1032
1038
|
[
|
|
1033
1039
|
["flags", "#"],
|
|
1034
1040
|
["out", "flags.1?true"],
|
|
@@ -1050,6 +1056,7 @@ exports.schema = Object.freeze({
|
|
|
1050
1056
|
["id", "int"],
|
|
1051
1057
|
["from_id", "flags.8?Peer"],
|
|
1052
1058
|
["from_boosts_applied", "flags.29?int"],
|
|
1059
|
+
["from_rank", "flags2.12?string"],
|
|
1053
1060
|
["peer_id", "Peer"],
|
|
1054
1061
|
["saved_peer_id", "flags.28?Peer"],
|
|
1055
1062
|
["fwd_from", "flags.2?MessageFwdHeader"],
|
|
@@ -1882,6 +1889,24 @@ exports.schema = Object.freeze({
|
|
|
1882
1889
|
],
|
|
1883
1890
|
"MessageAction",
|
|
1884
1891
|
],
|
|
1892
|
+
messageActionNoForwardsToggle: [
|
|
1893
|
+
0xBF7D6572,
|
|
1894
|
+
[
|
|
1895
|
+
["prev_value", "Bool"],
|
|
1896
|
+
["new_value", "Bool"],
|
|
1897
|
+
],
|
|
1898
|
+
"MessageAction",
|
|
1899
|
+
],
|
|
1900
|
+
messageActionNoForwardsRequest: [
|
|
1901
|
+
0x3E2793BA,
|
|
1902
|
+
[
|
|
1903
|
+
["flags", "#"],
|
|
1904
|
+
["expired", "flags.0?true"],
|
|
1905
|
+
["prev_value", "Bool"],
|
|
1906
|
+
["new_value", "Bool"],
|
|
1907
|
+
],
|
|
1908
|
+
"MessageAction",
|
|
1909
|
+
],
|
|
1885
1910
|
dialog: [
|
|
1886
1911
|
0xD58A08C6,
|
|
1887
1912
|
[
|
|
@@ -2257,6 +2282,8 @@ exports.schema = Object.freeze({
|
|
|
2257
2282
|
["can_view_revenue", "flags2.9?true"],
|
|
2258
2283
|
["bot_can_manage_emoji_status", "flags2.10?true"],
|
|
2259
2284
|
["display_gifts_button", "flags2.16?true"],
|
|
2285
|
+
["noforwards_my_enabled", "flags2.23?true"],
|
|
2286
|
+
["noforwards_peer_enabled", "flags2.24?true"],
|
|
2260
2287
|
["id", "long"],
|
|
2261
2288
|
["about", "flags.1?string"],
|
|
2262
2289
|
["settings", "PeerSettings"],
|
|
@@ -3898,6 +3925,16 @@ exports.schema = Object.freeze({
|
|
|
3898
3925
|
[],
|
|
3899
3926
|
"Update",
|
|
3900
3927
|
],
|
|
3928
|
+
updateChatParticipantRank: [
|
|
3929
|
+
0xBD8367B9,
|
|
3930
|
+
[
|
|
3931
|
+
["chat_id", "long"],
|
|
3932
|
+
["user_id", "long"],
|
|
3933
|
+
["rank", "string"],
|
|
3934
|
+
["version", "int"],
|
|
3935
|
+
],
|
|
3936
|
+
"Update",
|
|
3937
|
+
],
|
|
3901
3938
|
"updates.state": [
|
|
3902
3939
|
0xA56C2A3E,
|
|
3903
3940
|
[
|
|
@@ -5721,6 +5758,22 @@ exports.schema = Object.freeze({
|
|
|
5721
5758
|
],
|
|
5722
5759
|
"MessageEntity",
|
|
5723
5760
|
],
|
|
5761
|
+
messageEntityFormattedDate: [
|
|
5762
|
+
0x904AC7C7,
|
|
5763
|
+
[
|
|
5764
|
+
["flags", "#"],
|
|
5765
|
+
["relative", "flags.0?true"],
|
|
5766
|
+
["short_time", "flags.1?true"],
|
|
5767
|
+
["long_time", "flags.2?true"],
|
|
5768
|
+
["short_date", "flags.3?true"],
|
|
5769
|
+
["long_date", "flags.4?true"],
|
|
5770
|
+
["day_of_week", "flags.5?true"],
|
|
5771
|
+
["offset", "int"],
|
|
5772
|
+
["length", "int"],
|
|
5773
|
+
["date", "int"],
|
|
5774
|
+
],
|
|
5775
|
+
"MessageEntity",
|
|
5776
|
+
],
|
|
5724
5777
|
inputChannelEmpty: [
|
|
5725
5778
|
0xEE8C1E86,
|
|
5726
5779
|
[],
|
|
@@ -5812,17 +5865,18 @@ exports.schema = Object.freeze({
|
|
|
5812
5865
|
"ChannelMessagesFilter",
|
|
5813
5866
|
],
|
|
5814
5867
|
channelParticipant: [
|
|
5815
|
-
|
|
5868
|
+
0x1BD54456,
|
|
5816
5869
|
[
|
|
5817
5870
|
["flags", "#"],
|
|
5818
5871
|
["user_id", "long"],
|
|
5819
5872
|
["date", "int"],
|
|
5820
5873
|
["subscription_until_date", "flags.0?int"],
|
|
5874
|
+
["rank", "flags.2?string"],
|
|
5821
5875
|
],
|
|
5822
5876
|
"ChannelParticipant",
|
|
5823
5877
|
],
|
|
5824
5878
|
channelParticipantSelf: [
|
|
5825
|
-
|
|
5879
|
+
0xA9478A1A,
|
|
5826
5880
|
[
|
|
5827
5881
|
["flags", "#"],
|
|
5828
5882
|
["via_request", "flags.0?true"],
|
|
@@ -5830,6 +5884,7 @@ exports.schema = Object.freeze({
|
|
|
5830
5884
|
["inviter_id", "long"],
|
|
5831
5885
|
["date", "int"],
|
|
5832
5886
|
["subscription_until_date", "flags.1?int"],
|
|
5887
|
+
["rank", "flags.2?string"],
|
|
5833
5888
|
],
|
|
5834
5889
|
"ChannelParticipant",
|
|
5835
5890
|
],
|
|
@@ -5859,7 +5914,7 @@ exports.schema = Object.freeze({
|
|
|
5859
5914
|
"ChannelParticipant",
|
|
5860
5915
|
],
|
|
5861
5916
|
channelParticipantBanned: [
|
|
5862
|
-
|
|
5917
|
+
0xD5F0AD91,
|
|
5863
5918
|
[
|
|
5864
5919
|
["flags", "#"],
|
|
5865
5920
|
["left", "flags.0?true"],
|
|
@@ -5867,6 +5922,7 @@ exports.schema = Object.freeze({
|
|
|
5867
5922
|
["kicked_by", "long"],
|
|
5868
5923
|
["date", "int"],
|
|
5869
5924
|
["banned_rights", "ChatBannedRights"],
|
|
5925
|
+
["rank", "flags.2?string"],
|
|
5870
5926
|
],
|
|
5871
5927
|
"ChannelParticipant",
|
|
5872
5928
|
],
|
|
@@ -8046,6 +8102,15 @@ exports.schema = Object.freeze({
|
|
|
8046
8102
|
],
|
|
8047
8103
|
"ChannelAdminLogEventAction",
|
|
8048
8104
|
],
|
|
8105
|
+
channelAdminLogEventActionParticipantEditRank: [
|
|
8106
|
+
0x5806B4EC,
|
|
8107
|
+
[
|
|
8108
|
+
["user_id", "long"],
|
|
8109
|
+
["prev_rank", "string"],
|
|
8110
|
+
["new_rank", "string"],
|
|
8111
|
+
],
|
|
8112
|
+
"ChannelAdminLogEventAction",
|
|
8113
|
+
],
|
|
8049
8114
|
channelAdminLogEvent: [
|
|
8050
8115
|
0x1FAD68CD,
|
|
8051
8116
|
[
|
|
@@ -8088,6 +8153,7 @@ exports.schema = Object.freeze({
|
|
|
8088
8153
|
["send", "flags.16?true"],
|
|
8089
8154
|
["forums", "flags.17?true"],
|
|
8090
8155
|
["sub_extend", "flags.18?true"],
|
|
8156
|
+
["edit_rank", "flags.19?true"],
|
|
8091
8157
|
],
|
|
8092
8158
|
"ChannelAdminLogEventsFilter",
|
|
8093
8159
|
],
|
|
@@ -8941,6 +9007,7 @@ exports.schema = Object.freeze({
|
|
|
8941
9007
|
["edit_stories", "flags.15?true"],
|
|
8942
9008
|
["delete_stories", "flags.16?true"],
|
|
8943
9009
|
["manage_direct_messages", "flags.17?true"],
|
|
9010
|
+
["manage_ranks", "flags.18?true"],
|
|
8944
9011
|
],
|
|
8945
9012
|
"ChatAdminRights",
|
|
8946
9013
|
],
|
|
@@ -8968,6 +9035,7 @@ exports.schema = Object.freeze({
|
|
|
8968
9035
|
["send_voices", "flags.23?true"],
|
|
8969
9036
|
["send_docs", "flags.24?true"],
|
|
8970
9037
|
["send_plain", "flags.25?true"],
|
|
9038
|
+
["edit_rank", "flags.26?true"],
|
|
8971
9039
|
["until_date", "int"],
|
|
8972
9040
|
],
|
|
8973
9041
|
"ChatBannedRights",
|
|
@@ -9146,17 +9214,20 @@ exports.schema = Object.freeze({
|
|
|
9146
9214
|
"messages.SearchCounter",
|
|
9147
9215
|
],
|
|
9148
9216
|
urlAuthResultRequest: [
|
|
9149
|
-
|
|
9217
|
+
0xF8F8EB1E,
|
|
9150
9218
|
[
|
|
9151
9219
|
["flags", "#"],
|
|
9152
9220
|
["request_write_access", "flags.0?true"],
|
|
9153
9221
|
["request_phone_number", "flags.1?true"],
|
|
9222
|
+
["match_codes_first", "flags.5?true"],
|
|
9154
9223
|
["bot", "User"],
|
|
9155
9224
|
["domain", "string"],
|
|
9156
9225
|
["browser", "flags.2?string"],
|
|
9157
9226
|
["platform", "flags.2?string"],
|
|
9158
9227
|
["ip", "flags.2?string"],
|
|
9159
9228
|
["region", "flags.2?string"],
|
|
9229
|
+
["match_codes", "flags.3?Vector<string>"],
|
|
9230
|
+
["user_id_hint", "flags.4?long"],
|
|
9160
9231
|
],
|
|
9161
9232
|
"UrlAuthResult",
|
|
9162
9233
|
],
|
|
@@ -16756,18 +16827,19 @@ exports.schema = Object.freeze({
|
|
|
16756
16827
|
"Vector<messages.SearchCounter>",
|
|
16757
16828
|
],
|
|
16758
16829
|
"messages.requestUrlAuth": [
|
|
16759
|
-
|
|
16830
|
+
0x894CC99C,
|
|
16760
16831
|
[
|
|
16761
16832
|
["flags", "#"],
|
|
16762
16833
|
["peer", "flags.1?InputPeer"],
|
|
16763
16834
|
["msg_id", "flags.1?int"],
|
|
16764
16835
|
["button_id", "flags.1?int"],
|
|
16765
16836
|
["url", "flags.2?string"],
|
|
16837
|
+
["in_app_origin", "flags.3?string"],
|
|
16766
16838
|
],
|
|
16767
16839
|
"UrlAuthResult",
|
|
16768
16840
|
],
|
|
16769
16841
|
"messages.acceptUrlAuth": [
|
|
16770
|
-
|
|
16842
|
+
0x67A3F0DE,
|
|
16771
16843
|
[
|
|
16772
16844
|
["flags", "#"],
|
|
16773
16845
|
["write_allowed", "flags.0?true"],
|
|
@@ -16776,6 +16848,7 @@ exports.schema = Object.freeze({
|
|
|
16776
16848
|
["msg_id", "flags.1?int"],
|
|
16777
16849
|
["button_id", "flags.1?int"],
|
|
16778
16850
|
["url", "flags.2?string"],
|
|
16851
|
+
["match_code", "flags.4?string"],
|
|
16779
16852
|
],
|
|
16780
16853
|
"UrlAuthResult",
|
|
16781
16854
|
],
|
|
@@ -17116,10 +17189,12 @@ exports.schema = Object.freeze({
|
|
|
17116
17189
|
"Updates",
|
|
17117
17190
|
],
|
|
17118
17191
|
"messages.toggleNoForwards": [
|
|
17119
|
-
|
|
17192
|
+
0xB2081A35,
|
|
17120
17193
|
[
|
|
17194
|
+
["flags", "#"],
|
|
17121
17195
|
["peer", "InputPeer"],
|
|
17122
17196
|
["enabled", "Bool"],
|
|
17197
|
+
["request_msg_id", "flags.0?int"],
|
|
17123
17198
|
],
|
|
17124
17199
|
"Updates",
|
|
17125
17200
|
],
|
|
@@ -17977,6 +18052,46 @@ exports.schema = Object.freeze({
|
|
|
17977
18052
|
],
|
|
17978
18053
|
"TextWithEntities",
|
|
17979
18054
|
],
|
|
18055
|
+
"messages.editChatCreator": [
|
|
18056
|
+
0xF743B857,
|
|
18057
|
+
[
|
|
18058
|
+
["peer", "InputPeer"],
|
|
18059
|
+
["user_id", "InputUser"],
|
|
18060
|
+
["password", "InputCheckPasswordSRP"],
|
|
18061
|
+
],
|
|
18062
|
+
"Updates",
|
|
18063
|
+
],
|
|
18064
|
+
"messages.getFutureChatCreatorAfterLeave": [
|
|
18065
|
+
0x3B7D0EA6,
|
|
18066
|
+
[
|
|
18067
|
+
["peer", "InputPeer"],
|
|
18068
|
+
],
|
|
18069
|
+
"User",
|
|
18070
|
+
],
|
|
18071
|
+
"messages.editChatParticipantRank": [
|
|
18072
|
+
0xA00F32B0,
|
|
18073
|
+
[
|
|
18074
|
+
["peer", "InputPeer"],
|
|
18075
|
+
["participant", "InputPeer"],
|
|
18076
|
+
["rank", "string"],
|
|
18077
|
+
],
|
|
18078
|
+
"Updates",
|
|
18079
|
+
],
|
|
18080
|
+
"messages.declineUrlAuth": [
|
|
18081
|
+
0x35436BBC,
|
|
18082
|
+
[
|
|
18083
|
+
["url", "string"],
|
|
18084
|
+
],
|
|
18085
|
+
"Bool",
|
|
18086
|
+
],
|
|
18087
|
+
"messages.checkUrlAuthMatchCode": [
|
|
18088
|
+
0xC9A47B0B,
|
|
18089
|
+
[
|
|
18090
|
+
["url", "string"],
|
|
18091
|
+
["match_code", "string"],
|
|
18092
|
+
],
|
|
18093
|
+
"Bool",
|
|
18094
|
+
],
|
|
17980
18095
|
"updates.getState": [
|
|
17981
18096
|
0xEDD4882A,
|
|
17982
18097
|
[],
|
|
@@ -18379,12 +18494,13 @@ exports.schema = Object.freeze({
|
|
|
18379
18494
|
"Updates",
|
|
18380
18495
|
],
|
|
18381
18496
|
"channels.editAdmin": [
|
|
18382
|
-
|
|
18497
|
+
0x9A98AD68,
|
|
18383
18498
|
[
|
|
18499
|
+
["flags", "#"],
|
|
18384
18500
|
["channel", "InputChannel"],
|
|
18385
18501
|
["user_id", "InputUser"],
|
|
18386
18502
|
["admin_rights", "ChatAdminRights"],
|
|
18387
|
-
["rank", "string"],
|
|
18503
|
+
["rank", "flags.0?string"],
|
|
18388
18504
|
],
|
|
18389
18505
|
"Updates",
|
|
18390
18506
|
],
|
|
@@ -18557,15 +18673,6 @@ exports.schema = Object.freeze({
|
|
|
18557
18673
|
],
|
|
18558
18674
|
"Bool",
|
|
18559
18675
|
],
|
|
18560
|
-
"channels.editCreator": [
|
|
18561
|
-
0x8F38CD1F,
|
|
18562
|
-
[
|
|
18563
|
-
["channel", "InputChannel"],
|
|
18564
|
-
["user_id", "InputUser"],
|
|
18565
|
-
["password", "InputCheckPasswordSRP"],
|
|
18566
|
-
],
|
|
18567
|
-
"Updates",
|
|
18568
|
-
],
|
|
18569
18676
|
"channels.editLocation": [
|
|
18570
18677
|
0x58E63F6D,
|
|
18571
18678
|
[
|
|
@@ -18801,13 +18908,6 @@ exports.schema = Object.freeze({
|
|
|
18801
18908
|
],
|
|
18802
18909
|
"Bool",
|
|
18803
18910
|
],
|
|
18804
|
-
"channels.getFutureCreatorAfterLeave": [
|
|
18805
|
-
0xA00918AF,
|
|
18806
|
-
[
|
|
18807
|
-
["channel", "InputChannel"],
|
|
18808
|
-
],
|
|
18809
|
-
"User",
|
|
18810
|
-
],
|
|
18811
18911
|
"bots.sendCustomRequest": [
|
|
18812
18912
|
0xAA2769ED,
|
|
18813
18913
|
[
|
|
@@ -20826,15 +20926,15 @@ exports.schema = Object.freeze({
|
|
|
20826
20926
|
[0x17D493D5]: "channelForbidden",
|
|
20827
20927
|
[0x2633421B]: "chatFull",
|
|
20828
20928
|
[0xE4E0B29D]: "channelFull",
|
|
20829
|
-
[
|
|
20830
|
-
[
|
|
20831
|
-
[
|
|
20929
|
+
[0x38E79FDE]: "chatParticipant",
|
|
20930
|
+
[0xE1F867B8]: "chatParticipantCreator",
|
|
20931
|
+
[0x0360D5D2]: "chatParticipantAdmin",
|
|
20832
20932
|
[0x8763D3E1]: "chatParticipantsForbidden",
|
|
20833
20933
|
[0x3CBC93F8]: "chatParticipants",
|
|
20834
20934
|
[0x37C1011C]: "chatPhotoEmpty",
|
|
20835
20935
|
[0x1C6E1C11]: "chatPhoto",
|
|
20836
20936
|
[0x90A6CA84]: "messageEmpty",
|
|
20837
|
-
[
|
|
20937
|
+
[0x3AE56482]: "message",
|
|
20838
20938
|
[0x7A800E0A]: "messageService",
|
|
20839
20939
|
[0x3DED6320]: "messageMediaEmpty",
|
|
20840
20940
|
[0x695150D7]: "messageMediaPhoto",
|
|
@@ -20917,6 +21017,8 @@ exports.schema = Object.freeze({
|
|
|
20917
21017
|
[0x73ADA76B]: "messageActionStarGiftPurchaseOfferDeclined",
|
|
20918
21018
|
[0xB07ED085]: "messageActionNewCreatorPending",
|
|
20919
21019
|
[0xE188503B]: "messageActionChangeCreator",
|
|
21020
|
+
[0xBF7D6572]: "messageActionNoForwardsToggle",
|
|
21021
|
+
[0x3E2793BA]: "messageActionNoForwardsRequest",
|
|
20920
21022
|
[0xD58A08C6]: "dialog",
|
|
20921
21023
|
[0x71BD134C]: "dialogFolder",
|
|
20922
21024
|
[0x2331B22D]: "photoEmpty",
|
|
@@ -21144,6 +21246,7 @@ exports.schema = Object.freeze({
|
|
|
21144
21246
|
[0xDC58F31E]: "updateStarGiftAuctionUserState",
|
|
21145
21247
|
[0xFB9C547A]: "updateEmojiGameInfo",
|
|
21146
21248
|
[0xAC072444]: "updateStarGiftCraftFail",
|
|
21249
|
+
[0xBD8367B9]: "updateChatParticipantRank",
|
|
21147
21250
|
[0xA56C2A3E]: "updates.state",
|
|
21148
21251
|
[0x5D75A138]: "updates.differenceEmpty",
|
|
21149
21252
|
[0x00F49CA0]: "updates.difference",
|
|
@@ -21360,6 +21463,7 @@ exports.schema = Object.freeze({
|
|
|
21360
21463
|
[0x32CA960F]: "messageEntitySpoiler",
|
|
21361
21464
|
[0xC8CF05F8]: "messageEntityCustomEmoji",
|
|
21362
21465
|
[0xF1CCAAAC]: "messageEntityBlockquote",
|
|
21466
|
+
[0x904AC7C7]: "messageEntityFormattedDate",
|
|
21363
21467
|
[0xEE8C1E86]: "inputChannelEmpty",
|
|
21364
21468
|
[0xF35AEC28]: "inputChannel",
|
|
21365
21469
|
[0x5B934F9D]: "inputChannelFromMessage",
|
|
@@ -21370,11 +21474,11 @@ exports.schema = Object.freeze({
|
|
|
21370
21474
|
[0x2064674E]: "updates.channelDifference",
|
|
21371
21475
|
[0x94D42EE7]: "channelMessagesFilterEmpty",
|
|
21372
21476
|
[0xCD77D957]: "channelMessagesFilter",
|
|
21373
|
-
[
|
|
21374
|
-
[
|
|
21477
|
+
[0x1BD54456]: "channelParticipant",
|
|
21478
|
+
[0xA9478A1A]: "channelParticipantSelf",
|
|
21375
21479
|
[0x2FE601D3]: "channelParticipantCreator",
|
|
21376
21480
|
[0x34C3BB53]: "channelParticipantAdmin",
|
|
21377
|
-
[
|
|
21481
|
+
[0xD5F0AD91]: "channelParticipantBanned",
|
|
21378
21482
|
[0x1B03F006]: "channelParticipantLeft",
|
|
21379
21483
|
[0xDE3F3C79]: "channelParticipantsRecent",
|
|
21380
21484
|
[0xB4608969]: "channelParticipantsAdmins",
|
|
@@ -21622,6 +21726,7 @@ exports.schema = Object.freeze({
|
|
|
21622
21726
|
[0x60A79C79]: "channelAdminLogEventActionToggleSignatureProfiles",
|
|
21623
21727
|
[0x64642DB3]: "channelAdminLogEventActionParticipantSubExtend",
|
|
21624
21728
|
[0xC517F77E]: "channelAdminLogEventActionToggleAutotranslation",
|
|
21729
|
+
[0x5806B4EC]: "channelAdminLogEventActionParticipantEditRank",
|
|
21625
21730
|
[0x1FAD68CD]: "channelAdminLogEvent",
|
|
21626
21731
|
[0xED8AF74D]: "channels.adminLogResults",
|
|
21627
21732
|
[0xEA107AE4]: "channelAdminLogEventsFilter",
|
|
@@ -21748,7 +21853,7 @@ exports.schema = Object.freeze({
|
|
|
21748
21853
|
[0xFBD2C296]: "inputFolderPeer",
|
|
21749
21854
|
[0xE9BAA668]: "folderPeer",
|
|
21750
21855
|
[0xE844EBFF]: "messages.searchCounter",
|
|
21751
|
-
[
|
|
21856
|
+
[0xF8F8EB1E]: "urlAuthResultRequest",
|
|
21752
21857
|
[0x623A8FA0]: "urlAuthResultAccepted",
|
|
21753
21858
|
[0xA9D6DB1F]: "urlAuthResultDefault",
|
|
21754
21859
|
[0xBFB5AD8B]: "channelLocationEmpty",
|
|
@@ -22281,4 +22386,4 @@ exports.schema = Object.freeze({
|
|
|
22281
22386
|
[0x4FDD3430]: "keyboardButtonStyle",
|
|
22282
22387
|
},
|
|
22283
22388
|
});
|
|
22284
|
-
exports.LAYER =
|
|
22389
|
+
exports.LAYER = 223;
|
|
@@ -52,6 +52,8 @@ export interface ChatAdministratorRights {
|
|
|
52
52
|
canDeleteStories: boolean;
|
|
53
53
|
/** Whether the administrator manage direct messages. */
|
|
54
54
|
canManageDirectMessages: boolean;
|
|
55
|
+
/** Whether the administrator manage member tags. */
|
|
56
|
+
canManageTags: boolean;
|
|
55
57
|
}
|
|
56
58
|
export declare function constructChatAdministratorRights(rights_: Api.ChatAdminRights): ChatAdministratorRights;
|
|
57
59
|
export declare function chatAdministratorRightsToTlObject<T extends Partial<ChatAdministratorRights>>(rights: T): Required<T> extends ChatAdministratorRights ? Api.chatAdminRights : unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_chat_administrator_rights.d.ts","sourceRoot":"","sources":["../../src/types/0_chat_administrator_rights.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,0CAA0C;AAC1C,MAAM,WAAW,uBAAuB;IACtC,oEAAoE;IACpE,WAAW,EAAE,OAAO,CAAC;IACrB,wMAAwM;IACxM,aAAa,EAAE,OAAO,CAAC;IACvB,oEAAoE;IACpE,iBAAiB,EAAE,OAAO,CAAC;IAC3B,wDAAwD;IACxD,mBAAmB,EAAE,OAAO,CAAC;IAC7B,yEAAyE;IACzE,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iFAAiF;IACjF,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iHAAiH;IACjH,aAAa,EAAE,OAAO,CAAC;IACvB,8DAA8D;IAC9D,cAAc,EAAE,OAAO,CAAC;IACxB,4FAA4F;IAC5F,eAAe,EAAE,OAAO,CAAC;IACzB,4GAA4G;IAC5G,eAAe,EAAE,OAAO,CAAC;IACzB,6FAA6F;IAC7F,cAAc,EAAE,OAAO,CAAC;IACxB,mFAAmF;IACnF,eAAe,EAAE,OAAO,CAAC;IACzB,kDAAkD;IAClD,cAAc,EAAE,OAAO,CAAC;IACxB,kDAAkD;IAClD,cAAc,EAAE,OAAO,CAAC;IACxB,oDAAoD;IACpD,gBAAgB,EAAE,OAAO,CAAC;IAC1B,wDAAwD;IACxD,uBAAuB,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"0_chat_administrator_rights.d.ts","sourceRoot":"","sources":["../../src/types/0_chat_administrator_rights.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,0CAA0C;AAC1C,MAAM,WAAW,uBAAuB;IACtC,oEAAoE;IACpE,WAAW,EAAE,OAAO,CAAC;IACrB,wMAAwM;IACxM,aAAa,EAAE,OAAO,CAAC;IACvB,oEAAoE;IACpE,iBAAiB,EAAE,OAAO,CAAC;IAC3B,wDAAwD;IACxD,mBAAmB,EAAE,OAAO,CAAC;IAC7B,yEAAyE;IACzE,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iFAAiF;IACjF,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iHAAiH;IACjH,aAAa,EAAE,OAAO,CAAC;IACvB,8DAA8D;IAC9D,cAAc,EAAE,OAAO,CAAC;IACxB,4FAA4F;IAC5F,eAAe,EAAE,OAAO,CAAC;IACzB,4GAA4G;IAC5G,eAAe,EAAE,OAAO,CAAC;IACzB,6FAA6F;IAC7F,cAAc,EAAE,OAAO,CAAC;IACxB,mFAAmF;IACnF,eAAe,EAAE,OAAO,CAAC;IACzB,kDAAkD;IAClD,cAAc,EAAE,OAAO,CAAC;IACxB,kDAAkD;IAClD,cAAc,EAAE,OAAO,CAAC;IACxB,oDAAoD;IACpD,gBAAgB,EAAE,OAAO,CAAC;IAC1B,wDAAwD;IACxD,uBAAuB,EAAE,OAAO,CAAC;IACjC,oDAAoD;IACpD,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,wBAAgB,gCAAgC,CAAC,OAAO,EAAE,GAAG,CAAC,eAAe,GAAG,uBAAuB,CAoBtG;AAED,wBAAgB,iCAAiC,CAAC,CAAC,SAAS,OAAO,CAAC,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,SAAS,uBAAuB,GAAG,GAAG,CAAC,eAAe,GAAG,OAAO,CAqBpL"}
|
|
@@ -39,6 +39,7 @@ function constructChatAdministratorRights(rights_) {
|
|
|
39
39
|
canEditStories: rights_.edit_stories || false,
|
|
40
40
|
canDeleteStories: rights_.delete_stories || false,
|
|
41
41
|
canManageDirectMessages: rights_.manage_direct_messages || false,
|
|
42
|
+
canManageTags: rights_.manage_ranks || false,
|
|
42
43
|
};
|
|
43
44
|
}
|
|
44
45
|
function chatAdministratorRightsToTlObject(rights) {
|
|
@@ -60,5 +61,6 @@ function chatAdministratorRightsToTlObject(rights) {
|
|
|
60
61
|
edit_stories: rights.canEditStories || undefined,
|
|
61
62
|
delete_stories: rights.canDeleteStories || undefined,
|
|
62
63
|
manage_direct_messages: rights.canManageDirectMessages || undefined,
|
|
64
|
+
manage_ranks: rights.canManageTags || undefined,
|
|
63
65
|
};
|
|
64
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_chat_member.d.ts","sourceRoot":"","sources":["../../src/types/2_chat_member.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,KAAK,uBAAuB,EAAoC,MAAM,kCAAkC,CAAC;AAClH,OAA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C,IAAI,CAAC,GAAG,CAAC,kBAAkB,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,EAAE,UAAU,CAAC,OAAO,OAAO,CAAC,CAAA;CAAE,CAAC,EAAE,OAAO,EAAE,UAAU,GAAG,UAAU,CAmF7N"}
|
|
@@ -52,7 +52,7 @@ function constructChatMember(member, participant, getPeer) {
|
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
else if (_2_tl_js_1.Api.is("channelParticipantBanned", participant)) {
|
|
55
|
-
const until = participant.banned_rights.until_date
|
|
55
|
+
const until = participant.banned_rights.until_date;
|
|
56
56
|
if (!participant.banned_rights.view_messages) {
|
|
57
57
|
participant.peer;
|
|
58
58
|
return (0, _1_utilities_js_1.cleanObject)({
|
|
@@ -72,7 +72,7 @@ function constructChatMember(member, participant, getPeer) {
|
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
else if (_2_tl_js_1.Api.is("channelParticipantSelf", participant)) {
|
|
75
|
-
const until = participant.subscription_until_date
|
|
75
|
+
const until = participant.subscription_until_date;
|
|
76
76
|
return (0, _1_utilities_js_1.cleanObject)({
|
|
77
77
|
status: "member",
|
|
78
78
|
member,
|
|
@@ -103,6 +103,7 @@ function constructChatMember(member, participant, getPeer) {
|
|
|
103
103
|
canEditStories: false,
|
|
104
104
|
canManageDirectMessages: false,
|
|
105
105
|
canPostStories: false,
|
|
106
|
+
canManageTags: false,
|
|
106
107
|
},
|
|
107
108
|
});
|
|
108
109
|
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
import { Api } from "../2_tl.js";
|
|
21
21
|
import type { PeerGetter } from "./1_chat_p.js";
|
|
22
22
|
/** @unlisted */
|
|
23
|
-
export type MessageEntityType = "mention" | "hashtag" | "botCommand" | "url" | "email" | "bold" | "italic" | "code" | "pre" | "textLink" | "textMention" | "cashtag" | "phoneNumber" | "underline" | "strikethrough" | "blockquote" | "bankCard" | "spoiler" | "customEmoji";
|
|
23
|
+
export type MessageEntityType = "mention" | "hashtag" | "botCommand" | "url" | "email" | "bold" | "italic" | "code" | "pre" | "textLink" | "textMention" | "cashtag" | "phoneNumber" | "underline" | "strikethrough" | "blockquote" | "bankCard" | "spoiler" | "customEmoji" | "dateTime";
|
|
24
24
|
/** @unlisted */
|
|
25
25
|
export interface _MessageEntityBase {
|
|
26
26
|
type: MessageEntityType;
|
|
@@ -131,8 +131,17 @@ export interface MessageEntityCustomEmoji extends _MessageEntityBase {
|
|
|
131
131
|
/** The identifier of the custom emoji. */
|
|
132
132
|
customEmojiId: string;
|
|
133
133
|
}
|
|
134
|
+
/** @unlisted */
|
|
135
|
+
export interface MessageEntityDateTime extends _MessageEntityBase {
|
|
136
|
+
/** @discriminator */
|
|
137
|
+
type: "dateTime";
|
|
138
|
+
/** The format of the date time. */
|
|
139
|
+
format?: string;
|
|
140
|
+
/** A point in time. */
|
|
141
|
+
dateTime: number;
|
|
142
|
+
}
|
|
134
143
|
/** A single entity of a message's text or caption. */
|
|
135
|
-
export type MessageEntity = MessageEntityMention | MessageEntityHashtag | MessageEntityBotCommand | MessageEntityURL | MessageEntityEmailAddress | MessageEntityBold | MessageEntityItalic | MessageEntityCode | MessageEntityPre | MessageEntityTextLink | MessageEntityTextMention | MessageEntityCashtag | MessageEntityPhoneNumber | MessageEntityUnderline | MessageEntityStrikethrough | MessageEntityBlockquote | MessageEntityBankCard | MessageEntitySpoiler | MessageEntityCustomEmoji;
|
|
144
|
+
export type MessageEntity = MessageEntityMention | MessageEntityHashtag | MessageEntityBotCommand | MessageEntityURL | MessageEntityEmailAddress | MessageEntityBold | MessageEntityItalic | MessageEntityCode | MessageEntityPre | MessageEntityTextLink | MessageEntityTextMention | MessageEntityCashtag | MessageEntityPhoneNumber | MessageEntityUnderline | MessageEntityStrikethrough | MessageEntityBlockquote | MessageEntityBankCard | MessageEntitySpoiler | MessageEntityCustomEmoji | MessageEntityDateTime;
|
|
136
145
|
export declare function constructMessageEntity(obj: Api.MessageEntity): MessageEntity | null;
|
|
137
146
|
export declare function messageEntityToTlObject(entity: MessageEntity, getPeer: PeerGetter): Api.MessageEntity;
|
|
138
147
|
export declare function sortMessageEntities(entities: MessageEntity[]): MessageEntity[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_message_entity.d.ts","sourceRoot":"","sources":["../../src/types/2_message_entity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,gBAAgB;AAChB,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,SAAS,GACT,YAAY,GACZ,KAAK,GACL,OAAO,GACP,MAAM,GACN,QAAQ,GACR,MAAM,GACN,KAAK,GACL,UAAU,GACV,aAAa,GACb,SAAS,GACT,aAAa,GACb,WAAW,GACX,eAAe,GACf,YAAY,GACZ,UAAU,GACV,SAAS,GACT,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"2_message_entity.d.ts","sourceRoot":"","sources":["../../src/types/2_message_entity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,gBAAgB;AAChB,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,SAAS,GACT,YAAY,GACZ,KAAK,GACL,OAAO,GACP,MAAM,GACN,QAAQ,GACR,MAAM,GACN,KAAK,GACL,UAAU,GACV,aAAa,GACb,SAAS,GACT,aAAa,GACb,WAAW,GACX,eAAe,GACf,YAAY,GACZ,UAAU,GACV,SAAS,GACT,aAAa,GACb,UAAU,CAAC;AAEf,gBAAgB;AAChB,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,iBAAiB,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE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AED,sDAAsD;AACtD,MAAM,MAAM,aAAa,GACrB,oBAAoB,GACpB,oBAAoB,GACpB,uBAAuB,GACvB,gBAAgB,GAChB,yBAAyB,GACzB,iBAAiB,GACjB,mBAAmB,GACnB,iBAAiB,GACjB,gBAAgB,GAChB,qBAAqB,GACrB,wBAAwB,GACxB,oBAAoB,GACpB,wBAAwB,GACxB,sBAAsB,GACtB,0BAA0B,GAC1B,uBAAuB,GACvB,qBAAqB,GACrB,oBAAoB,GACpB,wBAAwB,GACxB,qBAAqB,CAAC;AAE1B,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,GAAG,CAAC,aAAa,GAAG,aAAa,GAAG,IAAI,CAqEnF;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,GAAG,GAAG,CAAC,aAAa,CA6FrG;AAwBD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,aAAa,EAAE,CAY9E"}
|
|
@@ -83,6 +83,34 @@ function constructMessageEntity(obj) {
|
|
|
83
83
|
else if (_2_tl_js_1.Api.is("messageEntityCustomEmoji", obj)) {
|
|
84
84
|
return { type: "customEmoji", offset: obj.offset, length: obj.length, customEmojiId: String(obj.document_id) };
|
|
85
85
|
}
|
|
86
|
+
else if (_2_tl_js_1.Api.is("messageEntityFormattedDate", obj)) {
|
|
87
|
+
let format = "";
|
|
88
|
+
if (obj.relative) {
|
|
89
|
+
format += "r";
|
|
90
|
+
}
|
|
91
|
+
if (obj.day_of_week) {
|
|
92
|
+
format += "w";
|
|
93
|
+
}
|
|
94
|
+
if (obj.short_date) {
|
|
95
|
+
format += "d";
|
|
96
|
+
}
|
|
97
|
+
else if (obj.long_date) {
|
|
98
|
+
format += "D";
|
|
99
|
+
}
|
|
100
|
+
if (obj.short_time) {
|
|
101
|
+
format += "t";
|
|
102
|
+
}
|
|
103
|
+
else if (obj.long_time) {
|
|
104
|
+
format += "T";
|
|
105
|
+
}
|
|
106
|
+
return (0, _1_utilities_js_1.cleanObject)({
|
|
107
|
+
type: "dateTime",
|
|
108
|
+
offset: obj.offset,
|
|
109
|
+
length: obj.length,
|
|
110
|
+
format: format || undefined,
|
|
111
|
+
dateTime: obj.date,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
86
114
|
else {
|
|
87
115
|
return null;
|
|
88
116
|
}
|
|
@@ -150,6 +178,37 @@ function messageEntityToTlObject(entity, getPeer) {
|
|
|
150
178
|
return { _: "messageEntitySpoiler", offset, length };
|
|
151
179
|
case "customEmoji":
|
|
152
180
|
return { _: "messageEntityCustomEmoji", offset, length, document_id: BigInt(entity.customEmojiId) };
|
|
181
|
+
case "dateTime": {
|
|
182
|
+
const entity_ = { _: "messageEntityFormattedDate", offset, length, date: entity.dateTime };
|
|
183
|
+
if (entity.format) {
|
|
184
|
+
if (entity.format === "r" || entity.format === "R") {
|
|
185
|
+
entity_.relative = true;
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
for (const character of entity.format) {
|
|
189
|
+
switch (character) {
|
|
190
|
+
case "t":
|
|
191
|
+
entity_.short_time = true;
|
|
192
|
+
break;
|
|
193
|
+
case "T":
|
|
194
|
+
entity_.long_time = true;
|
|
195
|
+
break;
|
|
196
|
+
case "d":
|
|
197
|
+
entity_.short_date = true;
|
|
198
|
+
break;
|
|
199
|
+
case "D":
|
|
200
|
+
entity_.long_date = true;
|
|
201
|
+
break;
|
|
202
|
+
case "w":
|
|
203
|
+
case "W":
|
|
204
|
+
entity_.day_of_week = true;
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return entity_;
|
|
211
|
+
}
|
|
153
212
|
}
|
|
154
213
|
}
|
|
155
214
|
const priorities = {
|
|
@@ -172,6 +231,7 @@ const priorities = {
|
|
|
172
231
|
"bankCard": 50,
|
|
173
232
|
"spoiler": 94,
|
|
174
233
|
"customEmoji": 99,
|
|
234
|
+
"dateTime": 30,
|
|
175
235
|
};
|
|
176
236
|
function sortMessageEntities(entities) {
|
|
177
237
|
return entities.sort(({ offset, type, length }, other) => {
|
|
@@ -89,6 +89,8 @@ export interface _MessageBase {
|
|
|
89
89
|
mediaGroupId?: string;
|
|
90
90
|
/** The signature of the message. */
|
|
91
91
|
authorSignature?: string;
|
|
92
|
+
/** The member tag of the sender of the message. */
|
|
93
|
+
tag?: string;
|
|
92
94
|
/** The number of times the message was viewed. */
|
|
93
95
|
views?: number;
|
|
94
96
|
/** The number of times the message was forwarded. */
|
|
@@ -99,7 +101,7 @@ export interface _MessageBase {
|
|
|
99
101
|
businessConnectionId?: string;
|
|
100
102
|
/** The number of the boosts made by the sender of the message. */
|
|
101
103
|
senderBoostCount?: number;
|
|
102
|
-
/** The identifier of the business connection in which the message was sent
|
|
104
|
+
/** The identifier of the business connection in which the message was sent. */
|
|
103
105
|
viaBusinessBot?: User;
|
|
104
106
|
/** The identifier of the message effect that has been attached to the message. */
|
|
105
107
|
effectId?: string;
|