@mtcute/core 0.12.5 → 0.13.1

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.
Files changed (175) hide show
  1. package/cjs/highlevel/client.d.ts +104 -2
  2. package/cjs/highlevel/client.js +27 -0
  3. package/cjs/highlevel/client.js.map +1 -1
  4. package/cjs/highlevel/methods/_imports.js.map +1 -1
  5. package/cjs/highlevel/methods/chats/archive-chats.js +2 -1
  6. package/cjs/highlevel/methods/chats/archive-chats.js.map +1 -1
  7. package/cjs/highlevel/methods/chats/get-nearby-chats.js +1 -1
  8. package/cjs/highlevel/methods/chats/get-nearby-chats.js.map +1 -1
  9. package/cjs/highlevel/methods/dialogs/find-dialogs.d.ts +12 -0
  10. package/cjs/highlevel/methods/dialogs/find-dialogs.js +88 -0
  11. package/cjs/highlevel/methods/dialogs/find-dialogs.js.map +1 -0
  12. package/cjs/highlevel/methods/dialogs/get-chatlist-preview.d.ts +8 -0
  13. package/cjs/highlevel/methods/dialogs/get-chatlist-preview.js +18 -0
  14. package/cjs/highlevel/methods/dialogs/get-chatlist-preview.js.map +1 -0
  15. package/cjs/highlevel/methods/dialogs/get-peer-dialogs.js +2 -1
  16. package/cjs/highlevel/methods/dialogs/get-peer-dialogs.js.map +1 -1
  17. package/cjs/highlevel/methods/dialogs/iter-dialogs.js +55 -4
  18. package/cjs/highlevel/methods/dialogs/iter-dialogs.js.map +1 -1
  19. package/cjs/highlevel/methods/dialogs/join-chatlist.d.ts +15 -0
  20. package/cjs/highlevel/methods/dialogs/join-chatlist.js +42 -0
  21. package/cjs/highlevel/methods/dialogs/join-chatlist.js.map +1 -0
  22. package/cjs/highlevel/methods/messages/_business-connection.d.ts +2 -1
  23. package/cjs/highlevel/methods/messages/_business-connection.js.map +1 -1
  24. package/cjs/highlevel/methods/messages/get-available-effects.d.ts +6 -0
  25. package/cjs/highlevel/methods/messages/get-available-effects.js +26 -0
  26. package/cjs/highlevel/methods/messages/get-available-effects.js.map +1 -0
  27. package/cjs/highlevel/methods/messages/get-fact-check.d.ts +11 -0
  28. package/cjs/highlevel/methods/messages/get-fact-check.js +27 -0
  29. package/cjs/highlevel/methods/messages/get-fact-check.js.map +1 -0
  30. package/cjs/highlevel/methods/messages/get-message-reactions.js +1 -0
  31. package/cjs/highlevel/methods/messages/get-message-reactions.js.map +1 -1
  32. package/cjs/highlevel/methods/messages/search-hashtag.d.ts +44 -0
  33. package/cjs/highlevel/methods/messages/search-hashtag.js +75 -0
  34. package/cjs/highlevel/methods/messages/search-hashtag.js.map +1 -0
  35. package/cjs/highlevel/methods/messages/send-common.d.ts +5 -0
  36. package/cjs/highlevel/methods/messages/send-common.js.map +1 -1
  37. package/cjs/highlevel/methods/messages/send-media-group.js +1 -0
  38. package/cjs/highlevel/methods/messages/send-media-group.js.map +1 -1
  39. package/cjs/highlevel/methods/messages/send-media.js +1 -0
  40. package/cjs/highlevel/methods/messages/send-media.js.map +1 -1
  41. package/cjs/highlevel/methods/messages/send-text.js +1 -0
  42. package/cjs/highlevel/methods/messages/send-text.js.map +1 -1
  43. package/cjs/highlevel/methods/misc/normalize-privacy-rules.js +2 -1
  44. package/cjs/highlevel/methods/misc/normalize-privacy-rules.js.map +1 -1
  45. package/cjs/highlevel/methods/premium/get-business-connection.js +1 -0
  46. package/cjs/highlevel/methods/premium/get-business-connection.js.map +1 -1
  47. package/cjs/highlevel/methods/users/resolve-peer-many.d.ts +6 -2
  48. package/cjs/highlevel/methods/users/resolve-peer-many.js +22 -6
  49. package/cjs/highlevel/methods/users/resolve-peer-many.js.map +1 -1
  50. package/cjs/highlevel/methods/users/resolve-peer.js +30 -11
  51. package/cjs/highlevel/methods/users/resolve-peer.js.map +1 -1
  52. package/cjs/highlevel/methods.d.ts +8 -0
  53. package/cjs/highlevel/methods.js +19 -4
  54. package/cjs/highlevel/methods.js.map +1 -1
  55. package/cjs/highlevel/types/conversation.js +1 -1
  56. package/cjs/highlevel/types/conversation.js.map +1 -1
  57. package/cjs/highlevel/types/messages/dialog.d.ts +2 -2
  58. package/cjs/highlevel/types/messages/dialog.js +2 -3
  59. package/cjs/highlevel/types/messages/dialog.js.map +1 -1
  60. package/cjs/highlevel/types/messages/fact-check.d.ts +30 -0
  61. package/cjs/highlevel/types/messages/fact-check.js +56 -0
  62. package/cjs/highlevel/types/messages/fact-check.js.map +1 -0
  63. package/cjs/highlevel/types/messages/index.d.ts +2 -0
  64. package/cjs/highlevel/types/messages/index.js +2 -0
  65. package/cjs/highlevel/types/messages/index.js.map +1 -1
  66. package/cjs/highlevel/types/messages/message-effect.d.ts +20 -0
  67. package/cjs/highlevel/types/messages/message-effect.js +69 -0
  68. package/cjs/highlevel/types/messages/message-effect.js.map +1 -0
  69. package/cjs/highlevel/types/messages/message-entity.d.ts +4 -1
  70. package/cjs/highlevel/types/messages/message-entity.js +1 -1
  71. package/cjs/highlevel/types/messages/message-entity.js.map +1 -1
  72. package/cjs/highlevel/types/messages/message.d.ts +12 -0
  73. package/cjs/highlevel/types/messages/message.js +23 -0
  74. package/cjs/highlevel/types/messages/message.js.map +1 -1
  75. package/cjs/highlevel/types/peers/chat.d.ts +2 -0
  76. package/cjs/highlevel/types/peers/chat.js +4 -0
  77. package/cjs/highlevel/types/peers/chat.js.map +1 -1
  78. package/cjs/highlevel/types/peers/chatlist-preview.d.ts +21 -0
  79. package/cjs/highlevel/types/peers/chatlist-preview.js +49 -0
  80. package/cjs/highlevel/types/peers/chatlist-preview.js.map +1 -0
  81. package/cjs/highlevel/types/peers/index.d.ts +1 -0
  82. package/cjs/highlevel/types/peers/index.js +1 -0
  83. package/cjs/highlevel/types/peers/index.js.map +1 -1
  84. package/cjs/network/network-manager.js +1 -1
  85. package/cjs/utils/links/misc.d.ts +6 -0
  86. package/cjs/utils/links/misc.js +24 -1
  87. package/cjs/utils/links/misc.js.map +1 -1
  88. package/esm/highlevel/client.d.ts +104 -2
  89. package/esm/highlevel/client.js +27 -0
  90. package/esm/highlevel/client.js.map +1 -1
  91. package/esm/highlevel/methods/_imports.js.map +1 -1
  92. package/esm/highlevel/methods/chats/archive-chats.js +2 -1
  93. package/esm/highlevel/methods/chats/archive-chats.js.map +1 -1
  94. package/esm/highlevel/methods/chats/get-nearby-chats.js +1 -1
  95. package/esm/highlevel/methods/chats/get-nearby-chats.js.map +1 -1
  96. package/esm/highlevel/methods/dialogs/find-dialogs.d.ts +12 -0
  97. package/esm/highlevel/methods/dialogs/find-dialogs.js +84 -0
  98. package/esm/highlevel/methods/dialogs/find-dialogs.js.map +1 -0
  99. package/esm/highlevel/methods/dialogs/get-chatlist-preview.d.ts +8 -0
  100. package/esm/highlevel/methods/dialogs/get-chatlist-preview.js +14 -0
  101. package/esm/highlevel/methods/dialogs/get-chatlist-preview.js.map +1 -0
  102. package/esm/highlevel/methods/dialogs/get-peer-dialogs.js +2 -1
  103. package/esm/highlevel/methods/dialogs/get-peer-dialogs.js.map +1 -1
  104. package/esm/highlevel/methods/dialogs/iter-dialogs.js +56 -5
  105. package/esm/highlevel/methods/dialogs/iter-dialogs.js.map +1 -1
  106. package/esm/highlevel/methods/dialogs/join-chatlist.d.ts +15 -0
  107. package/esm/highlevel/methods/dialogs/join-chatlist.js +38 -0
  108. package/esm/highlevel/methods/dialogs/join-chatlist.js.map +1 -0
  109. package/esm/highlevel/methods/messages/_business-connection.d.ts +2 -1
  110. package/esm/highlevel/methods/messages/_business-connection.js.map +1 -1
  111. package/esm/highlevel/methods/messages/get-available-effects.d.ts +6 -0
  112. package/esm/highlevel/methods/messages/get-available-effects.js +22 -0
  113. package/esm/highlevel/methods/messages/get-available-effects.js.map +1 -0
  114. package/esm/highlevel/methods/messages/get-fact-check.d.ts +11 -0
  115. package/esm/highlevel/methods/messages/get-fact-check.js +23 -0
  116. package/esm/highlevel/methods/messages/get-fact-check.js.map +1 -0
  117. package/esm/highlevel/methods/messages/get-message-reactions.js +1 -0
  118. package/esm/highlevel/methods/messages/get-message-reactions.js.map +1 -1
  119. package/esm/highlevel/methods/messages/search-hashtag.d.ts +44 -0
  120. package/esm/highlevel/methods/messages/search-hashtag.js +70 -0
  121. package/esm/highlevel/methods/messages/search-hashtag.js.map +1 -0
  122. package/esm/highlevel/methods/messages/send-common.d.ts +5 -0
  123. package/esm/highlevel/methods/messages/send-common.js.map +1 -1
  124. package/esm/highlevel/methods/messages/send-media-group.js +1 -0
  125. package/esm/highlevel/methods/messages/send-media-group.js.map +1 -1
  126. package/esm/highlevel/methods/messages/send-media.js +1 -0
  127. package/esm/highlevel/methods/messages/send-media.js.map +1 -1
  128. package/esm/highlevel/methods/messages/send-text.js +1 -0
  129. package/esm/highlevel/methods/messages/send-text.js.map +1 -1
  130. package/esm/highlevel/methods/misc/normalize-privacy-rules.js +2 -1
  131. package/esm/highlevel/methods/misc/normalize-privacy-rules.js.map +1 -1
  132. package/esm/highlevel/methods/premium/get-business-connection.js +1 -0
  133. package/esm/highlevel/methods/premium/get-business-connection.js.map +1 -1
  134. package/esm/highlevel/methods/users/resolve-peer-many.d.ts +6 -2
  135. package/esm/highlevel/methods/users/resolve-peer-many.js +22 -6
  136. package/esm/highlevel/methods/users/resolve-peer-many.js.map +1 -1
  137. package/esm/highlevel/methods/users/resolve-peer.js +30 -11
  138. package/esm/highlevel/methods/users/resolve-peer.js.map +1 -1
  139. package/esm/highlevel/methods.d.ts +8 -0
  140. package/esm/highlevel/methods.js +7 -0
  141. package/esm/highlevel/methods.js.map +1 -1
  142. package/esm/highlevel/types/conversation.js +1 -1
  143. package/esm/highlevel/types/conversation.js.map +1 -1
  144. package/esm/highlevel/types/messages/dialog.d.ts +2 -2
  145. package/esm/highlevel/types/messages/dialog.js +2 -3
  146. package/esm/highlevel/types/messages/dialog.js.map +1 -1
  147. package/esm/highlevel/types/messages/fact-check.d.ts +30 -0
  148. package/esm/highlevel/types/messages/fact-check.js +53 -0
  149. package/esm/highlevel/types/messages/fact-check.js.map +1 -0
  150. package/esm/highlevel/types/messages/index.d.ts +2 -0
  151. package/esm/highlevel/types/messages/index.js +2 -0
  152. package/esm/highlevel/types/messages/index.js.map +1 -1
  153. package/esm/highlevel/types/messages/message-effect.d.ts +20 -0
  154. package/esm/highlevel/types/messages/message-effect.js +66 -0
  155. package/esm/highlevel/types/messages/message-effect.js.map +1 -0
  156. package/esm/highlevel/types/messages/message-entity.d.ts +4 -1
  157. package/esm/highlevel/types/messages/message-entity.js +1 -1
  158. package/esm/highlevel/types/messages/message-entity.js.map +1 -1
  159. package/esm/highlevel/types/messages/message.d.ts +12 -0
  160. package/esm/highlevel/types/messages/message.js +23 -0
  161. package/esm/highlevel/types/messages/message.js.map +1 -1
  162. package/esm/highlevel/types/peers/chat.d.ts +2 -0
  163. package/esm/highlevel/types/peers/chat.js +4 -0
  164. package/esm/highlevel/types/peers/chat.js.map +1 -1
  165. package/esm/highlevel/types/peers/chatlist-preview.d.ts +21 -0
  166. package/esm/highlevel/types/peers/chatlist-preview.js +46 -0
  167. package/esm/highlevel/types/peers/chatlist-preview.js.map +1 -0
  168. package/esm/highlevel/types/peers/index.d.ts +1 -0
  169. package/esm/highlevel/types/peers/index.js +1 -0
  170. package/esm/highlevel/types/peers/index.js.map +1 -1
  171. package/esm/network/network-manager.js +1 -1
  172. package/esm/utils/links/misc.d.ts +6 -0
  173. package/esm/utils/links/misc.js +23 -0
  174. package/esm/utils/links/misc.js.map +1 -1
  175. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-peer.js","sourceRoot":"","sources":["../../../../../src/highlevel/methods/users/resolve-peer.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAuB;AAEvB,mCAA+B;AAE/B,wDAA+D;AAC/D,gEAAsG;AAEtG,qDAA2D;AAE3D,6DAAoF;AAEpF,kBAAkB;AAClB;;;;;;GAMG;AACI,KAAK,UAAU,WAAW,CAC7B,MAAuB,EACvB,MAAqB,EACrB,KAAK,GAAG,KAAK;IAEb,mEAAmE;IACnE,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC7B,IAAI,OAAE,CAAC,S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AAM;YACP,OAAO;gBACH,CAAC,EAAE,eAAe;gBAClB,MAAM,EAAE,MAAM;gBACd,UAAU,EAAE,cAAI,CAAC,IAAI;aACxB,CAAA;QACL,KAAK,MAAM;YACP,OAAO;gBACH,CAAC,EAAE,eAAe;gBAClB,MAAM,EAAE,MAAM;aACjB,CAAA;QACL,KAAK,SAAS;YACV,OAAO;gBACH,CAAC,EAAE,kBAAkB;gBACrB,SAAS,EAAE,MAAM;gBACjB,UAAU,EAAE,cAAI,CAAC,IAAI;aACxB,CAAA;IACT,CAAC;AACL,CAAC;AA7ID,kCA6IC;AAED;;GAEG;AACI,KAAK,UAAU,WAAW,CAC7B,MAAuB,EACvB,MAAqB,EACrB,KAAK,GAAG,KAAK;IAEb,OAAO,IAAA,2BAAW,EAAC,MAAM,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,CAAA;AACxE,CAAC;AAND,kCAMC;AAED;;GAEG;AACI,KAAK,UAAU,cAAc,CAChC,MAAuB,EACvB,MAAqB,EACrB,KAAK,GAAG,KAAK;IAEb,OAAO,IAAA,8BAAc,EAAC,MAAM,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,CAAA;AAC3E,CAAC;AAND,wCAMC","sourcesContent":["import Long from 'long'\n\nimport { tl } from '@mtcute/tl'\n\nimport { MtTypeAssertionError } from '../../../types/errors.js'\nimport { getMarkedPeerId, parseMarkedPeerId, toggleChannelIdMark } from '../../../utils/peer-utils.js'\nimport { ITelegramClient } from '../../client.types.js'\nimport { MtPeerNotFoundError } from '../../types/errors.js'\nimport { InputPeerLike } from '../../types/peers/index.js'\nimport { toInputChannel, toInputPeer, toInputUser } from '../../utils/peer-utils.js'\n\n// @available=both\n/**\n * Get the `InputPeer` of a known peer id.\n * Useful when an `InputPeer` is needed in Raw API.\n *\n * @param peerId The peer identifier that you want to extract the `InputPeer` from.\n * @param force Whether to force re-fetch the peer from the server (only for usernames and phone numbers)\n */\nexport async function resolvePeer(\n client: ITelegramClient,\n peerId: InputPeerLike,\n force = false,\n): Promise<tl.TypeInputPeer> {\n // for convenience we also accept tl and User/Chat objects directly\n if (typeof peerId === 'object') {\n if (tl.isAnyPeer(peerId)) {\n peerId = getMarkedPeerId(peerId)\n } else if ('inputPeer' in peerId) {\n // User | Chat\n peerId = peerId.inputPeer\n } else {\n peerId = toInputPeer(peerId)\n }\n }\n\n if (typeof peerId === 'object') {\n switch (peerId._) {\n case 'mtcute.dummyInputPeerMinUser':\n peerId = peerId.userId\n break\n case 'mtcute.dummyInputPeerMinChannel':\n peerId = toggleChannelIdMark(peerId.channelId)\n break\n default:\n return peerId\n }\n }\n\n if (typeof peerId === 'number' && !force) {\n const fromStorage = await client.storage.peers.getById(peerId)\n if (fromStorage) return fromStorage\n }\n\n if (typeof peerId === 'string') {\n if (peerId === 'self' || peerId === 'me') return { _: 'inputPeerSelf' }\n\n peerId = peerId.replace(/[@+\\s()]/g, '')\n\n let res\n\n if (peerId.match(/^\\d+$/)) {\n // phone number\n const fromStorage = await client.storage.peers.getByPhone(peerId)\n if (fromStorage) return fromStorage\n\n res = await client.call({\n _: 'contacts.resolvePhone',\n phone: peerId,\n })\n } else {\n // username\n if (!force) {\n const fromStorage = await client.storage.peers.getByUsername(peerId)\n if (fromStorage) return fromStorage\n }\n\n res = await client.call({\n _: 'contacts.resolveUsername',\n username: peerId,\n })\n }\n\n if (res.peer._ === 'peerUser') {\n const id = res.peer.userId\n\n const found = res.users.find((it) => it.id === id)\n\n if (found && found._ === 'user') {\n if (!found.accessHash) {\n // no access hash, we can't use it\n // this may happen when bot resolves a username\n // of a user who hasn't started a conversation with it\n throw new MtPeerNotFoundError(\n `Peer (user) with username ${peerId} was found, but it has no access hash`,\n )\n }\n\n return {\n _: 'inputPeerUser',\n userId: found.id,\n accessHash: found.accessHash,\n }\n }\n } else if (res.peer._ === 'peerChannel') {\n const id = res.peer.channelId\n const found = res.chats.find((it) => it.id === id)\n\n if (found) {\n if (!(found._ === 'channel' || found._ === 'channelForbidden')) {\n // chats can't have usernames\n // furthermore, our id is a channel id, so it must be a channel\n // this should never happen, unless Telegram goes crazy\n throw new MtTypeAssertionError('contacts.resolveUsername#chats', 'channel', found._)\n }\n\n if (!found.accessHash) {\n // shouldn't happen? but just in case\n throw new MtPeerNotFoundError(`Peer (channel) with ${peerId} was found, but it has no access hash`)\n }\n\n return {\n _: 'inputPeerChannel',\n channelId: found.id,\n accessHash: found.accessHash,\n }\n }\n } else {\n // chats can't have usernames\n throw new MtTypeAssertionError('contacts.resolveUsername', 'user or channel', res.peer._)\n }\n\n throw new MtPeerNotFoundError(`Could not find a peer by ${peerId}`)\n }\n\n // in some cases, the server allows us to use access_hash=0.\n // particularly, when we're a bot or we're referencing a user\n // who we have \"seen\" recently\n // if it's not the case, we'll get an `PEER_ID_INVALID` error anyways\n const [peerType, bareId] = parseMarkedPeerId(peerId)\n\n switch (peerType) {\n case 'user':\n return {\n _: 'inputPeerUser',\n userId: bareId,\n accessHash: Long.ZERO,\n }\n case 'chat':\n return {\n _: 'inputPeerChat',\n chatId: bareId,\n }\n case 'channel':\n return {\n _: 'inputPeerChannel',\n channelId: bareId,\n accessHash: Long.ZERO,\n }\n }\n}\n\n/**\n * Shorthand for `resolvePeer` that converts the input peer to `InputUser`.\n */\nexport async function resolveUser(\n client: ITelegramClient,\n peerId: InputPeerLike,\n force = false,\n): Promise<tl.TypeInputUser> {\n return toInputUser(await resolvePeer(client, peerId, force), peerId)\n}\n\n/**\n * Shorthand for `resolvePeer` that converts the input peer to `InputChannel`.\n */\nexport async function resolveChannel(\n client: ITelegramClient,\n peerId: InputPeerLike,\n force = false,\n): Promise<tl.TypeInputChannel> {\n return toInputChannel(await resolvePeer(client, peerId, force), peerId)\n}\n"]}
1
+ {"version":3,"file":"resolve-peer.js","sourceRoot":"","sources":["../../../../../src/highlevel/methods/users/resolve-peer.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAuB;AAEv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E,kBAAkB;gBACrB,SAAS,EAAE,MAAM;gBACjB,UAAU,EAAE,cAAI,CAAC,IAAI;aACxB,CAAA;IACT,CAAC;AACL,CAAC;AA3JD,kCA2JC;AAED;;GAEG;AACI,KAAK,UAAU,WAAW,CAC7B,MAAuB,EACvB,MAAqB,EACrB,KAAK,GAAG,KAAK;IAEb,OAAO,IAAA,2BAAW,EAAC,MAAM,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,CAAA;AACxE,CAAC;AAND,kCAMC;AAED;;GAEG;AACI,KAAK,UAAU,cAAc,CAChC,MAAuB,EACvB,MAAqB,EACrB,KAAK,GAAG,KAAK;IAEb,OAAO,IAAA,8BAAc,EAAC,MAAM,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,CAAA;AAC3E,CAAC;AAND,wCAMC","sourcesContent":["import Long from 'long'\n\nimport { tl } from '@mtcute/tl'\n\nimport { MtTypeAssertionError } from '../../../types/errors.js'\nimport { getMarkedPeerId, parseMarkedPeerId, toggleChannelIdMark } from '../../../utils/peer-utils.js'\nimport { ITelegramClient } from '../../client.types.js'\nimport { MtPeerNotFoundError } from '../../types/errors.js'\nimport { InputPeerLike } from '../../types/peers/index.js'\nimport { toInputChannel, toInputPeer, toInputUser } from '../../utils/peer-utils.js'\n\n// @available=both\n/**\n * Get the `InputPeer` of a known peer id.\n * Useful when an `InputPeer` is needed in Raw API.\n *\n * @param peerId The peer identifier that you want to extract the `InputPeer` from.\n * @param force Whether to force re-fetch the peer from the server (only for usernames and phone numbers)\n */\nexport async function resolvePeer(\n client: ITelegramClient,\n peerId: InputPeerLike,\n force = false,\n): Promise<tl.TypeInputPeer> {\n // for convenience we also accept tl and User/Chat objects directly\n if (typeof peerId === 'object') {\n if (tl.isAnyPeer(peerId)) {\n peerId = getMarkedPeerId(peerId)\n } else if ('inputPeer' in peerId) {\n // User | Chat\n peerId = peerId.inputPeer\n } else {\n peerId = toInputPeer(peerId)\n }\n }\n\n if (typeof peerId === 'object') {\n switch (peerId._) {\n case 'mtcute.dummyInputPeerMinUser':\n peerId = peerId.userId\n break\n case 'mtcute.dummyInputPeerMinChannel':\n peerId = toggleChannelIdMark(peerId.channelId)\n break\n default:\n return peerId\n }\n }\n\n if (typeof peerId === 'number' && !force) {\n const fromStorage = await client.storage.peers.getById(peerId)\n if (fromStorage) return fromStorage\n }\n\n if (typeof peerId === 'string') {\n if (peerId === 'self' || peerId === 'me') return { _: 'inputPeerSelf' }\n\n peerId = peerId.replace(/[@+\\s()]/g, '')\n\n let res\n\n if (peerId.match(/^\\d+$/)) {\n // phone number\n const fromStorage = await client.storage.peers.getByPhone(peerId)\n if (fromStorage) return fromStorage\n\n try {\n res = await client.call({\n _: 'contacts.resolvePhone',\n phone: peerId,\n })\n } catch (e) {\n if (tl.RpcError.is(e, 'PHONE_NOT_OCCUPIED')) {\n throw new MtPeerNotFoundError(`Peer with phone number ${peerId} was not found`)\n } else throw e\n }\n } else {\n // username\n if (!force) {\n const fromStorage = await client.storage.peers.getByUsername(peerId)\n if (fromStorage) return fromStorage\n }\n\n try {\n res = await client.call({\n _: 'contacts.resolveUsername',\n username: peerId,\n })\n } catch (e) {\n if (tl.RpcError.is(e, 'USERNAME_NOT_OCCUPIED')) {\n throw new MtPeerNotFoundError(`Peer with username ${peerId} was not found`)\n } else throw e\n }\n }\n\n if (res.peer._ === 'peerUser') {\n const id = res.peer.userId\n\n const found = res.users.find((it) => it.id === id)\n\n if (found && found._ === 'user') {\n if (!found.accessHash) {\n // no access hash, we can't use it\n // this may happen when bot resolves a username\n // of a user who hasn't started a conversation with it\n throw new MtPeerNotFoundError(\n `Peer (user) with username ${peerId} was found, but it has no access hash`,\n )\n }\n\n return {\n _: 'inputPeerUser',\n userId: found.id,\n accessHash: found.accessHash,\n }\n }\n } else if (res.peer._ === 'peerChannel') {\n const id = res.peer.channelId\n const found = res.chats.find((it) => it.id === id)\n\n if (found) {\n if (!(found._ === 'channel' || found._ === 'channelForbidden')) {\n // chats can't have usernames\n // furthermore, our id is a channel id, so it must be a channel\n // this should never happen, unless Telegram goes crazy\n throw new MtTypeAssertionError('contacts.resolveUsername#chats', 'channel', found._)\n }\n\n if (!found.accessHash) {\n // shouldn't happen? but just in case\n throw new MtPeerNotFoundError(`Peer (channel) with ${peerId} was found, but it has no access hash`)\n }\n\n return {\n _: 'inputPeerChannel',\n channelId: found.id,\n accessHash: found.accessHash,\n }\n }\n } else {\n // chats can't have usernames\n throw new MtTypeAssertionError('contacts.resolveUsername', 'user or channel', res.peer._)\n }\n\n throw new MtPeerNotFoundError(`Could not find a peer by ${peerId}`)\n }\n\n // in some cases, the server allows bots to use access_hash=0.\n // if it's not the case, we'll get an `PEER_ID_INVALID` error anyways\n const [peerType, bareId] = parseMarkedPeerId(peerId)\n\n if (peerType !== 'chat' && !client.storage.self.getCached(true)?.isBot) {\n throw new MtPeerNotFoundError(`Peer ${peerId} is not found in local cache`)\n }\n\n switch (peerType) {\n case 'user':\n return {\n _: 'inputPeerUser',\n userId: bareId,\n accessHash: Long.ZERO,\n }\n case 'chat':\n return {\n _: 'inputPeerChat',\n chatId: bareId,\n }\n case 'channel':\n return {\n _: 'inputPeerChannel',\n channelId: bareId,\n accessHash: Long.ZERO,\n }\n }\n}\n\n/**\n * Shorthand for `resolvePeer` that converts the input peer to `InputUser`.\n */\nexport async function resolveUser(\n client: ITelegramClient,\n peerId: InputPeerLike,\n force = false,\n): Promise<tl.TypeInputUser> {\n return toInputUser(await resolvePeer(client, peerId, force), peerId)\n}\n\n/**\n * Shorthand for `resolvePeer` that converts the input peer to `InputChannel`.\n */\nexport async function resolveChannel(\n client: ITelegramClient,\n peerId: InputPeerLike,\n force = false,\n): Promise<tl.TypeInputChannel> {\n return toInputChannel(await resolvePeer(client, peerId, force), peerId)\n}\n"]}
@@ -80,10 +80,13 @@ export { importContacts } from './methods/contacts/import-contacts.js';
80
80
  export { createFolder } from './methods/dialogs/create-folder.js';
81
81
  export { deleteFolder } from './methods/dialogs/delete-folder.js';
82
82
  export { editFolder } from './methods/dialogs/edit-folder.js';
83
+ export { findDialogs } from './methods/dialogs/find-dialogs.js';
83
84
  export { findFolder } from './methods/dialogs/find-folder.js';
85
+ export { getChatlistPreview } from './methods/dialogs/get-chatlist-preview.js';
84
86
  export { getFolders } from './methods/dialogs/get-folders.js';
85
87
  export { getPeerDialogs } from './methods/dialogs/get-peer-dialogs.js';
86
88
  export { iterDialogs } from './methods/dialogs/iter-dialogs.js';
89
+ export { joinChatlist } from './methods/dialogs/join-chatlist.js';
87
90
  export { setFoldersOrder } from './methods/dialogs/set-folders-order.js';
88
91
  export { downloadAsBuffer } from './methods/files/download-buffer.js';
89
92
  export { downloadAsIterable } from './methods/files/download-iterable.js';
@@ -128,8 +131,10 @@ export type { ForwardMessageOptions } from './methods/messages/forward-messages.
128
131
  export { forwardMessagesById } from './methods/messages/forward-messages.js';
129
132
  export { forwardMessages } from './methods/messages/forward-messages.js';
130
133
  export { getAllScheduledMessages } from './methods/messages/get-all-scheduled-messages.js';
134
+ export { getAvailableMessageEffects } from './methods/messages/get-available-effects.js';
131
135
  export { getCallbackQueryMessage } from './methods/messages/get-callback-query-message.js';
132
136
  export { getDiscussionMessage } from './methods/messages/get-discussion-message.js';
137
+ export { getFactCheck } from './methods/messages/get-fact-check.js';
133
138
  export type { GetHistoryOffset } from './methods/messages/get-history.js';
134
139
  export { getHistory } from './methods/messages/get-history.js';
135
140
  export { getMessageByLink } from './methods/messages/get-message-by-link.js';
@@ -151,6 +156,9 @@ export { readHistory } from './methods/messages/read-history.js';
151
156
  export { readReactions } from './methods/messages/read-reactions.js';
152
157
  export type { SearchGlobalOffset } from './methods/messages/search-global.js';
153
158
  export { searchGlobal } from './methods/messages/search-global.js';
159
+ export type { SearchHashtagOffset } from './methods/messages/search-hashtag.js';
160
+ export { searchHashtag } from './methods/messages/search-hashtag.js';
161
+ export { iterSearchHashtag } from './methods/messages/search-hashtag.js';
154
162
  export type { SearchMessagesOffset } from './methods/messages/search-messages.js';
155
163
  export { searchMessages } from './methods/messages/search-messages.js';
156
164
  export { answerText } from './methods/messages/send-answer.js';
@@ -7,10 +7,11 @@ if (typeof globalThis !== 'undefined' && !globalThis._MTCUTE_CJS_DEPRECATION_WAR
7
7
  "use strict";
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.iterChatEventLog = exports.getSimilarChannels = exports.getNearbyChats = exports.getFullChat = exports.getChatPreview = exports.getChatMembers = exports.getChatMember = exports.getChatEventLog = exports.getChat = exports.editAdminRights = exports.deleteUserHistory = exports.deleteHistory = exports.deleteGroup = exports.deleteChatPhoto = exports.deleteChannel = exports.createSupergroup = exports.createGroup = exports.createChannel = exports.banChatMember = exports.archiveChats = exports.addChatMembers = exports.setMyDefaultRights = exports.setMyCommands = exports.setInlineGameScore = exports.setGameScore = exports.setBotMenuButton = exports.setBotInfo = exports.getMyCommands = exports.getInlineGameHighScores = exports.getGameHighScores = exports.getCallbackAnswer = exports.getBotMenuButton = exports.getBotInfo = exports.deleteMyCommands = exports.answerPreCheckoutQuery = exports.answerInlineQuery = exports.answerCallbackQuery = exports.isSelfPeer = exports.startTest = exports.start = exports.signInBot = exports.signIn = exports.sendRecoveryCode = exports.sendCode = exports.run = exports.resendCode = exports.recoverPassword = exports.logOut = exports.getPasswordHint = exports.checkPassword = void 0;
10
- exports.reorderPinnedForumTopics = exports.iterForumTopics = exports.getForumTopicsById = exports.getForumTopics = exports.editForumTopic = exports.deleteForumTopicHistory = exports.createForumTopic = exports.uploadMedia = exports.uploadFile = exports._normalizeInputMedia = exports._normalizeInputFile = exports.downloadAsStream = exports.downloadAsIterable = exports.downloadAsBuffer = exports.setFoldersOrder = exports.iterDialogs = exports.getPeerDialogs = exports.getFolders = exports.findFolder = exports.editFolder = exports.deleteFolder = exports.createFolder = exports.importContacts = exports.getContacts = exports.deleteContacts = exports.addContact = exports.unbanChatMember = exports.unarchiveChats = exports.toggleJoinToSend = exports.toggleJoinRequests = exports.toggleFragmentUsername = exports.toggleContentProtection = exports.setSlowMode = exports.setChatUsername = exports.setChatTtl = exports.setChatTitle = exports.setChatPhoto = exports.setChatDescription = exports.setChatDefaultPermissions = exports.setChatColor = exports.saveDraft = exports.restrictChatMember = exports.reorderUsernames = exports.closeChat = exports.openChat = exports.markChatUnread = exports.leaveChat = exports.kickChatMember = exports.joinChat = exports.iterChatMembers = void 0;
11
- exports.commentText = exports.answerMediaGroup = exports.answerMedia = exports.answerText = exports.searchMessages = exports.searchGlobal = exports.readReactions = exports.readHistory = exports.pinMessage = exports.iterSearchMessages = exports.iterSearchGlobal = exports.iterReactionUsers = exports.iterHistory = exports.getScheduledMessages = exports.getReplyTo = exports.getReactionUsers = exports.getMessagesUnsafe = exports.getMessages = exports.getMessageReactions = exports.getMessageReactionsById = exports.getMessageGroup = exports.getMessageByLink = exports.getHistory = exports.getDiscussionMessage = exports.getCallbackQueryMessage = exports.getAllScheduledMessages = exports.forwardMessages = exports.forwardMessagesById = exports.editMessage = exports.editInlineMessage = exports.deleteScheduledMessages = exports.deleteMessages = exports.deleteMessagesById = exports.closePoll = exports.revokeInviteLink = exports.iterInviteLinks = exports.iterInviteLinkMembers = exports.hideJoinRequest = exports.hideAllJoinRequests = exports.getPrimaryInviteLink = exports.getInviteLinks = exports.getInviteLinkMembers = exports.getInviteLink = exports.exportInviteLink = exports.editInviteLink = exports.createInviteLink = exports.toggleGeneralTopicHidden = exports.toggleForumTopicPinned = exports.toggleForumTopicClosed = exports.toggleForum = void 0;
12
- exports.getMyStickerSets = exports.getInstalledStickers = exports.getCustomEmojisFromMessages = exports.getCustomEmojis = exports.deleteStickerFromSet = exports.createStickerSet = exports.addStickerToSet = exports.setBusinessWorkHours = exports.setBusinessIntro = exports.iterBoosters = exports.getMyBoostSlots = exports.getBusinessConnection = exports.getBusinessChatLinks = exports.getBoosts = exports.getBoostStats = exports.deleteBusinessChatLink = exports.editBusinessChatLink = exports.createBusinessChatLink = exports.canApplyBoost = exports.applyBoost = exports.removeCloudPassword = exports.cancelPasswordEmail = exports.resendPasswordEmail = exports.verifyPasswordEmail = exports.enableCloudPassword = exports.changeCloudPassword = exports._normalizePrivacyRules = exports.initTakeoutSession = exports.getCollectibleInfo = exports.unpinMessage = exports.unpinAllMessages = exports.translateText = exports.translateMessage = exports.sendVote = exports.sendTyping = exports.sendText = exports.sendScheduled = exports.replyMediaGroup = exports.replyMedia = exports.replyText = exports.sendReaction = exports.quoteWithMediaGroup = exports.quoteWithMedia = exports.quoteWithText = exports.sendMediaGroup = exports.sendMedia = exports.sendCopyGroup = exports.sendCopy = exports.commentMediaGroup = exports.commentMedia = void 0;
13
- exports.updateProfile = exports.unblockUser = exports.setOffline = exports.setMyUsername = exports.setMyProfilePhoto = exports.setMyEmojiStatus = exports.setMyBirthday = exports.setGlobalTtl = exports.resolvePeerMany = exports.resolveChannel = exports.resolveUser = exports.resolvePeer = exports.iterProfilePhotos = exports.getUsers = exports.getProfilePhotos = exports.getProfilePhoto = exports.getMyUsername = exports.getMe = exports.getGlobalTtl = exports.getCommonChats = exports.editCloseFriends = exports.editCloseFriendsRaw = exports.deleteProfilePhotos = exports.blockUser = exports.toggleStoriesPinned = exports.togglePeerStoriesArchived = exports.sendStoryReaction = exports.sendStory = exports.reportStory = exports.readStories = exports.iterStoryViewers = exports.iterProfileStories = exports.iterAllStories = exports.incrementStoriesViews = exports.hideMyStoriesViews = exports.getStoryViewers = exports.getStoryLink = exports.getStoriesInteractions = exports.getStoriesById = exports.getProfileStories = exports.getPeerStories = exports.getAllStories = exports.editStory = exports.deleteStories = exports.canSendStory = exports.setStickerSetThumb = exports.setChatStickerSet = exports.replaceStickerInSet = exports.moveStickerInSet = exports.getStickerSet = void 0;
10
+ exports.getForumTopics = exports.editForumTopic = exports.deleteForumTopicHistory = exports.createForumTopic = exports.uploadMedia = exports.uploadFile = exports._normalizeInputMedia = exports._normalizeInputFile = exports.downloadAsStream = exports.downloadAsIterable = exports.downloadAsBuffer = exports.setFoldersOrder = exports.joinChatlist = exports.iterDialogs = exports.getPeerDialogs = exports.getFolders = exports.getChatlistPreview = exports.findFolder = exports.findDialogs = exports.editFolder = exports.deleteFolder = exports.createFolder = exports.importContacts = exports.getContacts = exports.deleteContacts = exports.addContact = exports.unbanChatMember = exports.unarchiveChats = exports.toggleJoinToSend = exports.toggleJoinRequests = exports.toggleFragmentUsername = exports.toggleContentProtection = exports.setSlowMode = exports.setChatUsername = exports.setChatTtl = exports.setChatTitle = exports.setChatPhoto = exports.setChatDescription = exports.setChatDefaultPermissions = exports.setChatColor = exports.saveDraft = exports.restrictChatMember = exports.reorderUsernames = exports.closeChat = exports.openChat = exports.markChatUnread = exports.leaveChat = exports.kickChatMember = exports.joinChat = exports.iterChatMembers = void 0;
11
+ exports.searchGlobal = exports.readReactions = exports.readHistory = exports.pinMessage = exports.iterSearchMessages = exports.iterSearchGlobal = exports.iterReactionUsers = exports.iterHistory = exports.getScheduledMessages = exports.getReplyTo = exports.getReactionUsers = exports.getMessagesUnsafe = exports.getMessages = exports.getMessageReactions = exports.getMessageReactionsById = exports.getMessageGroup = exports.getMessageByLink = exports.getHistory = exports.getFactCheck = exports.getDiscussionMessage = exports.getCallbackQueryMessage = exports.getAvailableMessageEffects = exports.getAllScheduledMessages = exports.forwardMessages = exports.forwardMessagesById = exports.editMessage = exports.editInlineMessage = exports.deleteScheduledMessages = exports.deleteMessages = exports.deleteMessagesById = exports.closePoll = exports.revokeInviteLink = exports.iterInviteLinks = exports.iterInviteLinkMembers = exports.hideJoinRequest = exports.hideAllJoinRequests = exports.getPrimaryInviteLink = exports.getInviteLinks = exports.getInviteLinkMembers = exports.getInviteLink = exports.exportInviteLink = exports.editInviteLink = exports.createInviteLink = exports.toggleGeneralTopicHidden = exports.toggleForumTopicPinned = exports.toggleForumTopicClosed = exports.toggleForum = exports.reorderPinnedForumTopics = exports.iterForumTopics = exports.getForumTopicsById = void 0;
12
+ exports.setBusinessWorkHours = exports.setBusinessIntro = exports.iterBoosters = exports.getMyBoostSlots = exports.getBusinessConnection = exports.getBusinessChatLinks = exports.getBoosts = exports.getBoostStats = exports.deleteBusinessChatLink = exports.editBusinessChatLink = exports.createBusinessChatLink = exports.canApplyBoost = exports.applyBoost = exports.removeCloudPassword = exports.cancelPasswordEmail = exports.resendPasswordEmail = exports.verifyPasswordEmail = exports.enableCloudPassword = exports.changeCloudPassword = exports._normalizePrivacyRules = exports.initTakeoutSession = exports.getCollectibleInfo = exports.unpinMessage = exports.unpinAllMessages = exports.translateText = exports.translateMessage = exports.sendVote = exports.sendTyping = exports.sendText = exports.sendScheduled = exports.replyMediaGroup = exports.replyMedia = exports.replyText = exports.sendReaction = exports.quoteWithMediaGroup = exports.quoteWithMedia = exports.quoteWithText = exports.sendMediaGroup = exports.sendMedia = exports.sendCopyGroup = exports.sendCopy = exports.commentMediaGroup = exports.commentMedia = exports.commentText = exports.answerMediaGroup = exports.answerMedia = exports.answerText = exports.searchMessages = exports.iterSearchHashtag = exports.searchHashtag = void 0;
13
+ exports.setGlobalTtl = exports.resolvePeerMany = exports.resolveChannel = exports.resolveUser = exports.resolvePeer = exports.iterProfilePhotos = exports.getUsers = exports.getProfilePhotos = exports.getProfilePhoto = exports.getMyUsername = exports.getMe = exports.getGlobalTtl = exports.getCommonChats = exports.editCloseFriends = exports.editCloseFriendsRaw = exports.deleteProfilePhotos = exports.blockUser = exports.toggleStoriesPinned = exports.togglePeerStoriesArchived = exports.sendStoryReaction = exports.sendStory = exports.reportStory = exports.readStories = exports.iterStoryViewers = exports.iterProfileStories = exports.iterAllStories = exports.incrementStoriesViews = exports.hideMyStoriesViews = exports.getStoryViewers = exports.getStoryLink = exports.getStoriesInteractions = exports.getStoriesById = exports.getProfileStories = exports.getPeerStories = exports.getAllStories = exports.editStory = exports.deleteStories = exports.canSendStory = exports.setStickerSetThumb = exports.setChatStickerSet = exports.replaceStickerInSet = exports.moveStickerInSet = exports.getStickerSet = exports.getMyStickerSets = exports.getInstalledStickers = exports.getCustomEmojisFromMessages = exports.getCustomEmojis = exports.deleteStickerFromSet = exports.createStickerSet = exports.addStickerToSet = void 0;
14
+ exports.updateProfile = exports.unblockUser = exports.setOffline = exports.setMyUsername = exports.setMyProfilePhoto = exports.setMyEmojiStatus = exports.setMyBirthday = void 0;
14
15
  /* THIS FILE WAS AUTO-GENERATED */
15
16
  var check_password_js_1 = require("./methods/auth/check-password.js");
16
17
  Object.defineProperty(exports, "checkPassword", { enumerable: true, get: function () { return check_password_js_1.checkPassword; } });
@@ -174,14 +175,20 @@ var delete_folder_js_1 = require("./methods/dialogs/delete-folder.js");
174
175
  Object.defineProperty(exports, "deleteFolder", { enumerable: true, get: function () { return delete_folder_js_1.deleteFolder; } });
175
176
  var edit_folder_js_1 = require("./methods/dialogs/edit-folder.js");
176
177
  Object.defineProperty(exports, "editFolder", { enumerable: true, get: function () { return edit_folder_js_1.editFolder; } });
178
+ var find_dialogs_js_1 = require("./methods/dialogs/find-dialogs.js");
179
+ Object.defineProperty(exports, "findDialogs", { enumerable: true, get: function () { return find_dialogs_js_1.findDialogs; } });
177
180
  var find_folder_js_1 = require("./methods/dialogs/find-folder.js");
178
181
  Object.defineProperty(exports, "findFolder", { enumerable: true, get: function () { return find_folder_js_1.findFolder; } });
182
+ var get_chatlist_preview_js_1 = require("./methods/dialogs/get-chatlist-preview.js");
183
+ Object.defineProperty(exports, "getChatlistPreview", { enumerable: true, get: function () { return get_chatlist_preview_js_1.getChatlistPreview; } });
179
184
  var get_folders_js_1 = require("./methods/dialogs/get-folders.js");
180
185
  Object.defineProperty(exports, "getFolders", { enumerable: true, get: function () { return get_folders_js_1.getFolders; } });
181
186
  var get_peer_dialogs_js_1 = require("./methods/dialogs/get-peer-dialogs.js");
182
187
  Object.defineProperty(exports, "getPeerDialogs", { enumerable: true, get: function () { return get_peer_dialogs_js_1.getPeerDialogs; } });
183
188
  var iter_dialogs_js_1 = require("./methods/dialogs/iter-dialogs.js");
184
189
  Object.defineProperty(exports, "iterDialogs", { enumerable: true, get: function () { return iter_dialogs_js_1.iterDialogs; } });
190
+ var join_chatlist_js_1 = require("./methods/dialogs/join-chatlist.js");
191
+ Object.defineProperty(exports, "joinChatlist", { enumerable: true, get: function () { return join_chatlist_js_1.joinChatlist; } });
185
192
  var set_folders_order_js_1 = require("./methods/dialogs/set-folders-order.js");
186
193
  Object.defineProperty(exports, "setFoldersOrder", { enumerable: true, get: function () { return set_folders_order_js_1.setFoldersOrder; } });
187
194
  var download_buffer_js_1 = require("./methods/files/download-buffer.js");
@@ -262,10 +269,14 @@ var forward_messages_js_2 = require("./methods/messages/forward-messages.js");
262
269
  Object.defineProperty(exports, "forwardMessages", { enumerable: true, get: function () { return forward_messages_js_2.forwardMessages; } });
263
270
  var get_all_scheduled_messages_js_1 = require("./methods/messages/get-all-scheduled-messages.js");
264
271
  Object.defineProperty(exports, "getAllScheduledMessages", { enumerable: true, get: function () { return get_all_scheduled_messages_js_1.getAllScheduledMessages; } });
272
+ var get_available_effects_js_1 = require("./methods/messages/get-available-effects.js");
273
+ Object.defineProperty(exports, "getAvailableMessageEffects", { enumerable: true, get: function () { return get_available_effects_js_1.getAvailableMessageEffects; } });
265
274
  var get_callback_query_message_js_1 = require("./methods/messages/get-callback-query-message.js");
266
275
  Object.defineProperty(exports, "getCallbackQueryMessage", { enumerable: true, get: function () { return get_callback_query_message_js_1.getCallbackQueryMessage; } });
267
276
  var get_discussion_message_js_1 = require("./methods/messages/get-discussion-message.js");
268
277
  Object.defineProperty(exports, "getDiscussionMessage", { enumerable: true, get: function () { return get_discussion_message_js_1.getDiscussionMessage; } });
278
+ var get_fact_check_js_1 = require("./methods/messages/get-fact-check.js");
279
+ Object.defineProperty(exports, "getFactCheck", { enumerable: true, get: function () { return get_fact_check_js_1.getFactCheck; } });
269
280
  var get_history_js_1 = require("./methods/messages/get-history.js");
270
281
  Object.defineProperty(exports, "getHistory", { enumerable: true, get: function () { return get_history_js_1.getHistory; } });
271
282
  var get_message_by_link_js_1 = require("./methods/messages/get-message-by-link.js");
@@ -302,6 +313,10 @@ var read_reactions_js_1 = require("./methods/messages/read-reactions.js");
302
313
  Object.defineProperty(exports, "readReactions", { enumerable: true, get: function () { return read_reactions_js_1.readReactions; } });
303
314
  var search_global_js_1 = require("./methods/messages/search-global.js");
304
315
  Object.defineProperty(exports, "searchGlobal", { enumerable: true, get: function () { return search_global_js_1.searchGlobal; } });
316
+ var search_hashtag_js_1 = require("./methods/messages/search-hashtag.js");
317
+ Object.defineProperty(exports, "searchHashtag", { enumerable: true, get: function () { return search_hashtag_js_1.searchHashtag; } });
318
+ var search_hashtag_js_2 = require("./methods/messages/search-hashtag.js");
319
+ Object.defineProperty(exports, "iterSearchHashtag", { enumerable: true, get: function () { return search_hashtag_js_2.iterSearchHashtag; } });
305
320
  var search_messages_js_1 = require("./methods/messages/search-messages.js");
306
321
  Object.defineProperty(exports, "searchMessages", { enumerable: true, get: function () { return search_messages_js_1.searchMessages; } });
307
322
  var send_answer_js_1 = require("./methods/messages/send-answer.js");
@@ -1 +1 @@
1
- {"version":3,"file":"methods.js","sourceRoot":"","sources":["../../../src/highlevel/methods.ts"],"names":[],"mappings":";;;;;;;AAAA,kCAAkC;AAClC,sEAAgE;AAAvD,kHAAA,aAAa,OAAA;AACtB,4EAAqE;AAA5D,uHAAA,eAAe,OAAA;AACxB,wDAAkD;AAAzC,oGAAA,MAAM,OAAA;AACf,0EAAoE;AAA3D,sHAAA,eAAe,OAAA;AACxB,gEAA0D;AAAjD,4GAAA,UAAU,OAAA;AACnB,gDAA2C;AAAlC,6FAAA,GAAG,OAAA;AACZ,4DAAsD;AAA7C,wGAAA,QAAQ,OAAA;AACjB,8EAAuE;AAA9D,yHAAA,gBAAgB,OAAA;AACzB,wDAAkD;AAAzC,oGAAA,MAAM,OAAA;AACf,gEAAyD;AAAhD,2GAAA,SAAS,OAAA;AAClB,oDAA+C;AAAtC,iGAAA,KAAK,OAAA;AACd,8DAAwD;AAA/C,0GAAA,SAAS,OAAA;AAClB,oDAA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AAiB,OAAA;AAC1B,yEAAkE;AAAzD,mHAAA,aAAa,OAAA;AACtB,iEAA2D;AAAlD,4GAAA,UAAU,OAAA;AACnB,mEAA6D;AAApD,8GAAA,WAAW,OAAA;AACpB,uEAAiE;AAAxD,kHAAA,aAAa,OAAA","sourcesContent":["/* THIS FILE WAS AUTO-GENERATED */\nexport { checkPassword } from './methods/auth/check-password.js'\nexport { getPasswordHint } from './methods/auth/get-password-hint.js'\nexport { logOut } from './methods/auth/log-out.js'\nexport { recoverPassword } from './methods/auth/recover-password.js'\nexport { resendCode } from './methods/auth/resend-code.js'\nexport { run } from './methods/auth/run.js'\nexport { sendCode } from './methods/auth/send-code.js'\nexport { sendRecoveryCode } from './methods/auth/send-recovery-code.js'\nexport { signIn } from './methods/auth/sign-in.js'\nexport { signInBot } from './methods/auth/sign-in-bot.js'\nexport { start } from './methods/auth/start.js'\nexport { startTest } from './methods/auth/start-test.js'\nexport { isSelfPeer } from './methods/auth/utils.js'\nexport { answerCallbackQuery } from './methods/bots/answer-callback-query.js'\nexport { answerInlineQuery } from './methods/bots/answer-inline-query.js'\nexport { answerPreCheckoutQuery } from './methods/bots/answer-pre-checkout-query.js'\nexport { deleteMyCommands } from './methods/bots/delete-my-commands.js'\nexport { getBotInfo } from './methods/bots/get-bot-info.js'\nexport { getBotMenuButton } from './methods/bots/get-bot-menu-button.js'\nexport { getCallbackAnswer } from './methods/bots/get-callback-answer.js'\nexport { getGameHighScores } from './methods/bots/get-game-high-scores.js'\nexport { getInlineGameHighScores } from './methods/bots/get-game-high-scores.js'\nexport { getMyCommands } from './methods/bots/get-my-commands.js'\nexport { setBotInfo } from './methods/bots/set-bot-info.js'\nexport { setBotMenuButton } from './methods/bots/set-bot-menu-button.js'\nexport { setGameScore } from './methods/bots/set-game-score.js'\nexport { setInlineGameScore } from './methods/bots/set-game-score.js'\nexport { setMyCommands } from './methods/bots/set-my-commands.js'\nexport { setMyDefaultRights } from './methods/bots/set-my-default-rights.js'\nexport { addChatMembers } from './methods/chats/add-chat-members.js'\nexport { archiveChats } from './methods/chats/archive-chats.js'\nexport { banChatMember } from './methods/chats/ban-chat-member.js'\nexport { createChannel } from './methods/chats/create-channel.js'\nexport type { CreateGroupResult } from './methods/chats/create-group.js'\nexport { createGroup } from './methods/chats/create-group.js'\nexport { createSupergroup } from './methods/chats/create-supergroup.js'\nexport { deleteChannel } from './methods/chats/delete-channel.js'\nexport { deleteChatPhoto } from './methods/chats/delete-chat-photo.js'\nexport { deleteGroup } from './methods/chats/delete-group.js'\nexport { deleteHistory } from './methods/chats/delete-history.js'\nexport { deleteUserHistory } from './methods/chats/delete-user-history.js'\nexport { editAdminRights } from './methods/chats/edit-admin-rights.js'\nexport { getChat } from './methods/chats/get-chat.js'\nexport { getChatEventLog } from './methods/chats/get-chat-event-log.js'\nexport { getChatMember } from './methods/chats/get-chat-member.js'\nexport { getChatMembers } from './methods/chats/get-chat-members.js'\nexport { getChatPreview } from './methods/chats/get-chat-preview.js'\nexport { getFullChat } from './methods/chats/get-full-chat.js'\nexport { getNearbyChats } from './methods/chats/get-nearby-chats.js'\nexport { getSimilarChannels } from './methods/chats/get-similar-channels.js'\nexport { iterChatEventLog } from './methods/chats/iter-chat-event-log.js'\nexport { iterChatMembers } from './methods/chats/iter-chat-members.js'\nexport { joinChat } from './methods/chats/join-chat.js'\nexport { kickChatMember } from './methods/chats/kick-chat-member.js'\nexport { leaveChat } from './methods/chats/leave-chat.js'\nexport { markChatUnread } from './methods/chats/mark-chat-unread.js'\nexport { openChat } from './methods/chats/open-chat.js'\nexport { closeChat } from './methods/chats/open-chat.js'\nexport { reorderUsernames } from './methods/chats/reorder-usernames.js'\nexport { restrictChatMember } from './methods/chats/restrict-chat-member.js'\nexport { saveDraft } from './methods/chats/save-draft.js'\nexport { setChatColor } from './methods/chats/set-chat-color.js'\nexport { setChatDefaultPermissions } from './methods/chats/set-chat-default-permissions.js'\nexport { setChatDescription } from './methods/chats/set-chat-description.js'\nexport { setChatPhoto } from './methods/chats/set-chat-photo.js'\nexport { setChatTitle } from './methods/chats/set-chat-title.js'\nexport { setChatTtl } from './methods/chats/set-chat-ttl.js'\nexport { setChatUsername } from './methods/chats/set-chat-username.js'\nexport { setSlowMode } from './methods/chats/set-slow-mode.js'\nexport { toggleContentProtection } from './methods/chats/toggle-content-protection.js'\nexport { toggleFragmentUsername } from './methods/chats/toggle-fragment-username.js'\nexport { toggleJoinRequests } from './methods/chats/toggle-join-requests.js'\nexport { toggleJoinToSend } from './methods/chats/toggle-join-to-send.js'\nexport { unarchiveChats } from './methods/chats/unarchive-chats.js'\nexport { unbanChatMember } from './methods/chats/unban-chat-member.js'\nexport { addContact } from './methods/contacts/add-contact.js'\nexport { deleteContacts } from './methods/contacts/delete-contacts.js'\nexport { getContacts } from './methods/contacts/get-contacts.js'\nexport { importContacts } from './methods/contacts/import-contacts.js'\nexport { createFolder } from './methods/dialogs/create-folder.js'\nexport { deleteFolder } from './methods/dialogs/delete-folder.js'\nexport { editFolder } from './methods/dialogs/edit-folder.js'\nexport { findFolder } from './methods/dialogs/find-folder.js'\nexport { getFolders } from './methods/dialogs/get-folders.js'\nexport { getPeerDialogs } from './methods/dialogs/get-peer-dialogs.js'\nexport { iterDialogs } from './methods/dialogs/iter-dialogs.js'\nexport { setFoldersOrder } from './methods/dialogs/set-folders-order.js'\nexport { downloadAsBuffer } from './methods/files/download-buffer.js'\nexport { downloadAsIterable } from './methods/files/download-iterable.js'\nexport { downloadAsStream } from './methods/files/download-stream.js'\nexport { _normalizeInputFile } from './methods/files/normalize-input-file.js'\nexport { _normalizeInputMedia } from './methods/files/normalize-input-media.js'\nexport { uploadFile } from './methods/files/upload-file.js'\nexport { uploadMedia } from './methods/files/upload-media.js'\nexport { createForumTopic } from './methods/forums/create-forum-topic.js'\nexport { deleteForumTopicHistory } from './methods/forums/delete-forum-topic-history.js'\nexport { editForumTopic } from './methods/forums/edit-forum-topic.js'\nexport type { GetForumTopicsOffset } from './methods/forums/get-forum-topics.js'\nexport { getForumTopics } from './methods/forums/get-forum-topics.js'\nexport { getForumTopicsById } from './methods/forums/get-forum-topics-by-id.js'\nexport { iterForumTopics } from './methods/forums/iter-forum-topics.js'\nexport { reorderPinnedForumTopics } from './methods/forums/reorder-pinned-forum-topics.js'\nexport { toggleForum } from './methods/forums/toggle-forum.js'\nexport { toggleForumTopicClosed } from './methods/forums/toggle-forum-topic-closed.js'\nexport { toggleForumTopicPinned } from './methods/forums/toggle-forum-topic-pinned.js'\nexport { toggleGeneralTopicHidden } from './methods/forums/toggle-general-topic-hidden.js'\nexport { createInviteLink } from './methods/invite-links/create-invite-link.js'\nexport { editInviteLink } from './methods/invite-links/edit-invite-link.js'\nexport { exportInviteLink } from './methods/invite-links/export-invite-link.js'\nexport { getInviteLink } from './methods/invite-links/get-invite-link.js'\nexport { getInviteLinkMembers } from './methods/invite-links/get-invite-link-members.js'\nexport type { GetInviteLinksOffset } from './methods/invite-links/get-invite-links.js'\nexport { getInviteLinks } from './methods/invite-links/get-invite-links.js'\nexport { getPrimaryInviteLink } from './methods/invite-links/get-primary-invite-link.js'\nexport { hideAllJoinRequests } from './methods/invite-links/hide-all-join-requests.js'\nexport { hideJoinRequest } from './methods/invite-links/hide-join-request.js'\nexport { iterInviteLinkMembers } from './methods/invite-links/iter-invite-link-members.js'\nexport { iterInviteLinks } from './methods/invite-links/iter-invite-links.js'\nexport { revokeInviteLink } from './methods/invite-links/revoke-invite-link.js'\nexport { closePoll } from './methods/messages/close-poll.js'\nexport type { DeleteMessagesParams } from './methods/messages/delete-messages.js'\nexport { deleteMessagesById } from './methods/messages/delete-messages.js'\nexport { deleteMessages } from './methods/messages/delete-messages.js'\nexport { deleteScheduledMessages } from './methods/messages/delete-scheduled-messages.js'\nexport { editInlineMessage } from './methods/messages/edit-inline-message.js'\nexport { editMessage } from './methods/messages/edit-message.js'\nexport type { ForwardMessageOptions } from './methods/messages/forward-messages.js'\nexport { forwardMessagesById } from './methods/messages/forward-messages.js'\nexport { forwardMessages } from './methods/messages/forward-messages.js'\nexport { getAllScheduledMessages } from './methods/messages/get-all-scheduled-messages.js'\nexport { getCallbackQueryMessage } from './methods/messages/get-callback-query-message.js'\nexport { getDiscussionMessage } from './methods/messages/get-discussion-message.js'\nexport type { GetHistoryOffset } from './methods/messages/get-history.js'\nexport { getHistory } from './methods/messages/get-history.js'\nexport { getMessageByLink } from './methods/messages/get-message-by-link.js'\nexport { getMessageGroup } from './methods/messages/get-message-group.js'\nexport { getMessageReactionsById } from './methods/messages/get-message-reactions.js'\nexport { getMessageReactions } from './methods/messages/get-message-reactions.js'\nexport { getMessages } from './methods/messages/get-messages.js'\nexport { getMessagesUnsafe } from './methods/messages/get-messages-unsafe.js'\nexport type { GetReactionUsersOffset } from './methods/messages/get-reaction-users.js'\nexport { getReactionUsers } from './methods/messages/get-reaction-users.js'\nexport { getReplyTo } from './methods/messages/get-reply-to.js'\nexport { getScheduledMessages } from './methods/messages/get-scheduled-messages.js'\nexport { iterHistory } from './methods/messages/iter-history.js'\nexport { iterReactionUsers } from './methods/messages/iter-reaction-users.js'\nexport { iterSearchGlobal } from './methods/messages/iter-search-global.js'\nexport { iterSearchMessages } from './methods/messages/iter-search-messages.js'\nexport { pinMessage } from './methods/messages/pin-message.js'\nexport { readHistory } from './methods/messages/read-history.js'\nexport { readReactions } from './methods/messages/read-reactions.js'\nexport type { SearchGlobalOffset } from './methods/messages/search-global.js'\nexport { searchGlobal } from './methods/messages/search-global.js'\nexport type { SearchMessagesOffset } from './methods/messages/search-messages.js'\nexport { searchMessages } from './methods/messages/search-messages.js'\nexport { answerText } from './methods/messages/send-answer.js'\nexport { answerMedia } from './methods/messages/send-answer.js'\nexport { answerMediaGroup } from './methods/messages/send-answer.js'\nexport { commentText } from './methods/messages/send-comment.js'\nexport { commentMedia } from './methods/messages/send-comment.js'\nexport { commentMediaGroup } from './methods/messages/send-comment.js'\nexport type { SendCopyParams } from './methods/messages/send-copy.js'\nexport { sendCopy } from './methods/messages/send-copy.js'\nexport type { SendCopyGroupParams } from './methods/messages/send-copy-group.js'\nexport { sendCopyGroup } from './methods/messages/send-copy-group.js'\nexport { sendMedia } from './methods/messages/send-media.js'\nexport { sendMediaGroup } from './methods/messages/send-media-group.js'\nexport type { QuoteParamsFrom } from './methods/messages/send-quote.js'\nexport { quoteWithText } from './methods/messages/send-quote.js'\nexport { quoteWithMedia } from './methods/messages/send-quote.js'\nexport { quoteWithMediaGroup } from './methods/messages/send-quote.js'\nexport { sendReaction } from './methods/messages/send-reaction.js'\nexport { replyText } from './methods/messages/send-reply.js'\nexport { replyMedia } from './methods/messages/send-reply.js'\nexport { replyMediaGroup } from './methods/messages/send-reply.js'\nexport { sendScheduled } from './methods/messages/send-scheduled.js'\nexport { sendText } from './methods/messages/send-text.js'\nexport { sendTyping } from './methods/messages/send-typing.js'\nexport { sendVote } from './methods/messages/send-vote.js'\nexport { translateMessage } from './methods/messages/translate-message.js'\nexport { translateText } from './methods/messages/translate-text.js'\nexport { unpinAllMessages } from './methods/messages/unpin-all-messages.js'\nexport { unpinMessage } from './methods/messages/unpin-message.js'\nexport { getCollectibleInfo } from './methods/misc/get-collectible-info.js'\nexport { initTakeoutSession } from './methods/misc/init-takeout-session.js'\nexport { _normalizePrivacyRules } from './methods/misc/normalize-privacy-rules.js'\nexport { changeCloudPassword } from './methods/password/change-cloud-password.js'\nexport { enableCloudPassword } from './methods/password/enable-cloud-password.js'\nexport { verifyPasswordEmail } from './methods/password/password-email.js'\nexport { resendPasswordEmail } from './methods/password/password-email.js'\nexport { cancelPasswordEmail } from './methods/password/password-email.js'\nexport { removeCloudPassword } from './methods/password/remove-cloud-password.js'\nexport { applyBoost } from './methods/premium/apply-boost.js'\nexport type { CanApplyBoostResult } from './methods/premium/can-apply-boost.js'\nexport { canApplyBoost } from './methods/premium/can-apply-boost.js'\nexport { createBusinessChatLink } from './methods/premium/create-business-chat-link.js'\nexport { editBusinessChatLink } from './methods/premium/edit-business-chat-link.js'\nexport { deleteBusinessChatLink } from './methods/premium/edit-business-chat-link.js'\nexport { getBoostStats } from './methods/premium/get-boost-stats.js'\nexport { getBoosts } from './methods/premium/get-boosts.js'\nexport { getBusinessChatLinks } from './methods/premium/get-business-chat-links.js'\nexport { getBusinessConnection } from './methods/premium/get-business-connection.js'\nexport { getMyBoostSlots } from './methods/premium/get-my-boost-slots.js'\nexport { iterBoosters } from './methods/premium/iter-boosters.js'\nexport { setBusinessIntro } from './methods/premium/set-business-intro.js'\nexport { setBusinessWorkHours } from './methods/premium/set-business-work-hours.js'\nexport { addStickerToSet } from './methods/stickers/add-sticker-to-set.js'\nexport { createStickerSet } from './methods/stickers/create-sticker-set.js'\nexport { deleteStickerFromSet } from './methods/stickers/delete-sticker-from-set.js'\nexport { getCustomEmojis } from './methods/stickers/get-custom-emojis.js'\nexport { getCustomEmojisFromMessages } from './methods/stickers/get-custom-emojis.js'\nexport { getInstalledStickers } from './methods/stickers/get-installed-stickers.js'\nexport { getMyStickerSets } from './methods/stickers/get-my-sticker-sets.js'\nexport { getStickerSet } from './methods/stickers/get-sticker-set.js'\nexport { moveStickerInSet } from './methods/stickers/move-sticker-in-set.js'\nexport { replaceStickerInSet } from './methods/stickers/replace-sticker-in-set.js'\nexport { setChatStickerSet } from './methods/stickers/set-chat-sticker-set.js'\nexport { setStickerSetThumb } from './methods/stickers/set-sticker-set-thumb.js'\nexport type { CanSendStoryResult } from './methods/stories/can-send-story.js'\nexport { canSendStory } from './methods/stories/can-send-story.js'\nexport { deleteStories } from './methods/stories/delete-stories.js'\nexport { editStory } from './methods/stories/edit-story.js'\nexport { getAllStories } from './methods/stories/get-all-stories.js'\nexport { getPeerStories } from './methods/stories/get-peer-stories.js'\nexport { getProfileStories } from './methods/stories/get-profile-stories.js'\nexport { getStoriesById } from './methods/stories/get-stories-by-id.js'\nexport { getStoriesInteractions } from './methods/stories/get-stories-interactions.js'\nexport { getStoryLink } from './methods/stories/get-story-link.js'\nexport { getStoryViewers } from './methods/stories/get-story-viewers.js'\nexport { hideMyStoriesViews } from './methods/stories/hide-my-stories-views.js'\nexport { incrementStoriesViews } from './methods/stories/increment-stories-views.js'\nexport { iterAllStories } from './methods/stories/iter-all-stories.js'\nexport { iterProfileStories } from './methods/stories/iter-profile-stories.js'\nexport { iterStoryViewers } from './methods/stories/iter-story-viewers.js'\nexport { readStories } from './methods/stories/read-stories.js'\nexport { reportStory } from './methods/stories/report-story.js'\nexport { sendStory } from './methods/stories/send-story.js'\nexport { sendStoryReaction } from './methods/stories/send-story-reaction.js'\nexport { togglePeerStoriesArchived } from './methods/stories/toggle-peer-stories-archived.js'\nexport { toggleStoriesPinned } from './methods/stories/toggle-stories-pinned.js'\nexport { blockUser } from './methods/users/block-user.js'\nexport { deleteProfilePhotos } from './methods/users/delete-profile-photos.js'\nexport { editCloseFriendsRaw } from './methods/users/edit-close-friends.js'\nexport { editCloseFriends } from './methods/users/edit-close-friends.js'\nexport { getCommonChats } from './methods/users/get-common-chats.js'\nexport { getGlobalTtl } from './methods/users/get-global-ttl.js'\nexport { getMe } from './methods/users/get-me.js'\nexport { getMyUsername } from './methods/users/get-my-username.js'\nexport { getProfilePhoto } from './methods/users/get-profile-photo.js'\nexport { getProfilePhotos } from './methods/users/get-profile-photos.js'\nexport { getUsers } from './methods/users/get-users.js'\nexport { iterProfilePhotos } from './methods/users/iter-profile-photos.js'\nexport { resolvePeer } from './methods/users/resolve-peer.js'\nexport { resolveUser } from './methods/users/resolve-peer.js'\nexport { resolveChannel } from './methods/users/resolve-peer.js'\nexport { resolvePeerMany } from './methods/users/resolve-peer-many.js'\nexport { setGlobalTtl } from './methods/users/set-global-ttl.js'\nexport { setMyBirthday } from './methods/users/set-my-birthday.js'\nexport { setMyEmojiStatus } from './methods/users/set-my-emoji-status.js'\nexport { setMyProfilePhoto } from './methods/users/set-my-profile-photo.js'\nexport { setMyUsername } from './methods/users/set-my-username.js'\nexport { setOffline } from './methods/users/set-offline.js'\nexport { unblockUser } from './methods/users/unblock-user.js'\nexport { updateProfile } from './methods/users/update-profile.js'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6F;AAApF,4IAAA,yBAAyB,OAAA;AAClC,uFAAgF;AAAvE,+HAAA,mBAAmB,OAAA;AAC5B,+DAAyD;AAAhD,0GAAA,SAAS,OAAA;AAClB,qFAA8E;AAArE,+HAAA,mBAAmB,OAAA;AAC5B,+EAA2E;AAAlE,4HAAA,mBAAmB,OAAA;AAC5B,+EAAwE;AAA/D,yHAAA,gBAAgB,OAAA;AACzB,2EAAoE;AAA3D,qHAAA,cAAc,OAAA;AACvB,uEAAgE;AAAvD,iHAAA,YAAY,OAAA;AACrB,uDAAiD;AAAxC,kGAAA,KAAK,OAAA;AACd,yEAAkE;AAAzD,mHAAA,aAAa,OAAA;AACtB,6EAAsE;AAA7D,uHAAA,eAAe,OAAA;AACxB,+EAAwE;AAA/D,yHAAA,gBAAgB,OAAA;AACzB,6DAAuD;AAA9C,wGAAA,QAAQ,OAAA;AACjB,iFAA0E;AAAjE,2HAAA,iBAAiB,OAAA;AAC1B,mEAA6D;AAApD,8GAAA,WAAW,OAAA;AACpB,mEAA6D;AAApD,8GAAA,WAAW,OAAA;AACpB,mEAAgE;AAAvD,iHAAA,cAAc,OAAA;AACvB,6EAAsE;AAA7D,uHAAA,eAAe,OAAA;AACxB,uEAAgE;AAAvD,iHAAA,YAAY,OAAA;AACrB,yEAAkE;AAAzD,mHAAA,aAAa,OAAA;AACtB,iFAAyE;AAAhE,0HAAA,gBAAgB,OAAA;AACzB,mFAA2E;AAAlE,4HAAA,iBAAiB,OAAA;AAC1B,yEAAkE;AAAzD,mHAAA,aAAa,OAAA;AACtB,iEAA2D;AAAlD,4GAAA,UAAU,OAAA;AACnB,mEAA6D;AAApD,8GAAA,WAAW,OAAA;AACpB,uEAAiE;AAAxD,kHAAA,aAAa,OAAA","sourcesContent":["/* THIS FILE WAS AUTO-GENERATED */\nexport { checkPassword } from './methods/auth/check-password.js'\nexport { getPasswordHint } from './methods/auth/get-password-hint.js'\nexport { logOut } from './methods/auth/log-out.js'\nexport { recoverPassword } from './methods/auth/recover-password.js'\nexport { resendCode } from './methods/auth/resend-code.js'\nexport { run } from './methods/auth/run.js'\nexport { sendCode } from './methods/auth/send-code.js'\nexport { sendRecoveryCode } from './methods/auth/send-recovery-code.js'\nexport { signIn } from './methods/auth/sign-in.js'\nexport { signInBot } from './methods/auth/sign-in-bot.js'\nexport { start } from './methods/auth/start.js'\nexport { startTest } from './methods/auth/start-test.js'\nexport { isSelfPeer } from './methods/auth/utils.js'\nexport { answerCallbackQuery } from './methods/bots/answer-callback-query.js'\nexport { answerInlineQuery } from './methods/bots/answer-inline-query.js'\nexport { answerPreCheckoutQuery } from './methods/bots/answer-pre-checkout-query.js'\nexport { deleteMyCommands } from './methods/bots/delete-my-commands.js'\nexport { getBotInfo } from './methods/bots/get-bot-info.js'\nexport { getBotMenuButton } from './methods/bots/get-bot-menu-button.js'\nexport { getCallbackAnswer } from './methods/bots/get-callback-answer.js'\nexport { getGameHighScores } from './methods/bots/get-game-high-scores.js'\nexport { getInlineGameHighScores } from './methods/bots/get-game-high-scores.js'\nexport { getMyCommands } from './methods/bots/get-my-commands.js'\nexport { setBotInfo } from './methods/bots/set-bot-info.js'\nexport { setBotMenuButton } from './methods/bots/set-bot-menu-button.js'\nexport { setGameScore } from './methods/bots/set-game-score.js'\nexport { setInlineGameScore } from './methods/bots/set-game-score.js'\nexport { setMyCommands } from './methods/bots/set-my-commands.js'\nexport { setMyDefaultRights } from './methods/bots/set-my-default-rights.js'\nexport { addChatMembers } from './methods/chats/add-chat-members.js'\nexport { archiveChats } from './methods/chats/archive-chats.js'\nexport { banChatMember } from './methods/chats/ban-chat-member.js'\nexport { createChannel } from './methods/chats/create-channel.js'\nexport type { CreateGroupResult } from './methods/chats/create-group.js'\nexport { createGroup } from './methods/chats/create-group.js'\nexport { createSupergroup } from './methods/chats/create-supergroup.js'\nexport { deleteChannel } from './methods/chats/delete-channel.js'\nexport { deleteChatPhoto } from './methods/chats/delete-chat-photo.js'\nexport { deleteGroup } from './methods/chats/delete-group.js'\nexport { deleteHistory } from './methods/chats/delete-history.js'\nexport { deleteUserHistory } from './methods/chats/delete-user-history.js'\nexport { editAdminRights } from './methods/chats/edit-admin-rights.js'\nexport { getChat } from './methods/chats/get-chat.js'\nexport { getChatEventLog } from './methods/chats/get-chat-event-log.js'\nexport { getChatMember } from './methods/chats/get-chat-member.js'\nexport { getChatMembers } from './methods/chats/get-chat-members.js'\nexport { getChatPreview } from './methods/chats/get-chat-preview.js'\nexport { getFullChat } from './methods/chats/get-full-chat.js'\nexport { getNearbyChats } from './methods/chats/get-nearby-chats.js'\nexport { getSimilarChannels } from './methods/chats/get-similar-channels.js'\nexport { iterChatEventLog } from './methods/chats/iter-chat-event-log.js'\nexport { iterChatMembers } from './methods/chats/iter-chat-members.js'\nexport { joinChat } from './methods/chats/join-chat.js'\nexport { kickChatMember } from './methods/chats/kick-chat-member.js'\nexport { leaveChat } from './methods/chats/leave-chat.js'\nexport { markChatUnread } from './methods/chats/mark-chat-unread.js'\nexport { openChat } from './methods/chats/open-chat.js'\nexport { closeChat } from './methods/chats/open-chat.js'\nexport { reorderUsernames } from './methods/chats/reorder-usernames.js'\nexport { restrictChatMember } from './methods/chats/restrict-chat-member.js'\nexport { saveDraft } from './methods/chats/save-draft.js'\nexport { setChatColor } from './methods/chats/set-chat-color.js'\nexport { setChatDefaultPermissions } from './methods/chats/set-chat-default-permissions.js'\nexport { setChatDescription } from './methods/chats/set-chat-description.js'\nexport { setChatPhoto } from './methods/chats/set-chat-photo.js'\nexport { setChatTitle } from './methods/chats/set-chat-title.js'\nexport { setChatTtl } from './methods/chats/set-chat-ttl.js'\nexport { setChatUsername } from './methods/chats/set-chat-username.js'\nexport { setSlowMode } from './methods/chats/set-slow-mode.js'\nexport { toggleContentProtection } from './methods/chats/toggle-content-protection.js'\nexport { toggleFragmentUsername } from './methods/chats/toggle-fragment-username.js'\nexport { toggleJoinRequests } from './methods/chats/toggle-join-requests.js'\nexport { toggleJoinToSend } from './methods/chats/toggle-join-to-send.js'\nexport { unarchiveChats } from './methods/chats/unarchive-chats.js'\nexport { unbanChatMember } from './methods/chats/unban-chat-member.js'\nexport { addContact } from './methods/contacts/add-contact.js'\nexport { deleteContacts } from './methods/contacts/delete-contacts.js'\nexport { getContacts } from './methods/contacts/get-contacts.js'\nexport { importContacts } from './methods/contacts/import-contacts.js'\nexport { createFolder } from './methods/dialogs/create-folder.js'\nexport { deleteFolder } from './methods/dialogs/delete-folder.js'\nexport { editFolder } from './methods/dialogs/edit-folder.js'\nexport { findDialogs } from './methods/dialogs/find-dialogs.js'\nexport { findFolder } from './methods/dialogs/find-folder.js'\nexport { getChatlistPreview } from './methods/dialogs/get-chatlist-preview.js'\nexport { getFolders } from './methods/dialogs/get-folders.js'\nexport { getPeerDialogs } from './methods/dialogs/get-peer-dialogs.js'\nexport { iterDialogs } from './methods/dialogs/iter-dialogs.js'\nexport { joinChatlist } from './methods/dialogs/join-chatlist.js'\nexport { setFoldersOrder } from './methods/dialogs/set-folders-order.js'\nexport { downloadAsBuffer } from './methods/files/download-buffer.js'\nexport { downloadAsIterable } from './methods/files/download-iterable.js'\nexport { downloadAsStream } from './methods/files/download-stream.js'\nexport { _normalizeInputFile } from './methods/files/normalize-input-file.js'\nexport { _normalizeInputMedia } from './methods/files/normalize-input-media.js'\nexport { uploadFile } from './methods/files/upload-file.js'\nexport { uploadMedia } from './methods/files/upload-media.js'\nexport { createForumTopic } from './methods/forums/create-forum-topic.js'\nexport { deleteForumTopicHistory } from './methods/forums/delete-forum-topic-history.js'\nexport { editForumTopic } from './methods/forums/edit-forum-topic.js'\nexport type { GetForumTopicsOffset } from './methods/forums/get-forum-topics.js'\nexport { getForumTopics } from './methods/forums/get-forum-topics.js'\nexport { getForumTopicsById } from './methods/forums/get-forum-topics-by-id.js'\nexport { iterForumTopics } from './methods/forums/iter-forum-topics.js'\nexport { reorderPinnedForumTopics } from './methods/forums/reorder-pinned-forum-topics.js'\nexport { toggleForum } from './methods/forums/toggle-forum.js'\nexport { toggleForumTopicClosed } from './methods/forums/toggle-forum-topic-closed.js'\nexport { toggleForumTopicPinned } from './methods/forums/toggle-forum-topic-pinned.js'\nexport { toggleGeneralTopicHidden } from './methods/forums/toggle-general-topic-hidden.js'\nexport { createInviteLink } from './methods/invite-links/create-invite-link.js'\nexport { editInviteLink } from './methods/invite-links/edit-invite-link.js'\nexport { exportInviteLink } from './methods/invite-links/export-invite-link.js'\nexport { getInviteLink } from './methods/invite-links/get-invite-link.js'\nexport { getInviteLinkMembers } from './methods/invite-links/get-invite-link-members.js'\nexport type { GetInviteLinksOffset } from './methods/invite-links/get-invite-links.js'\nexport { getInviteLinks } from './methods/invite-links/get-invite-links.js'\nexport { getPrimaryInviteLink } from './methods/invite-links/get-primary-invite-link.js'\nexport { hideAllJoinRequests } from './methods/invite-links/hide-all-join-requests.js'\nexport { hideJoinRequest } from './methods/invite-links/hide-join-request.js'\nexport { iterInviteLinkMembers } from './methods/invite-links/iter-invite-link-members.js'\nexport { iterInviteLinks } from './methods/invite-links/iter-invite-links.js'\nexport { revokeInviteLink } from './methods/invite-links/revoke-invite-link.js'\nexport { closePoll } from './methods/messages/close-poll.js'\nexport type { DeleteMessagesParams } from './methods/messages/delete-messages.js'\nexport { deleteMessagesById } from './methods/messages/delete-messages.js'\nexport { deleteMessages } from './methods/messages/delete-messages.js'\nexport { deleteScheduledMessages } from './methods/messages/delete-scheduled-messages.js'\nexport { editInlineMessage } from './methods/messages/edit-inline-message.js'\nexport { editMessage } from './methods/messages/edit-message.js'\nexport type { ForwardMessageOptions } from './methods/messages/forward-messages.js'\nexport { forwardMessagesById } from './methods/messages/forward-messages.js'\nexport { forwardMessages } from './methods/messages/forward-messages.js'\nexport { getAllScheduledMessages } from './methods/messages/get-all-scheduled-messages.js'\nexport { getAvailableMessageEffects } from './methods/messages/get-available-effects.js'\nexport { getCallbackQueryMessage } from './methods/messages/get-callback-query-message.js'\nexport { getDiscussionMessage } from './methods/messages/get-discussion-message.js'\nexport { getFactCheck } from './methods/messages/get-fact-check.js'\nexport type { GetHistoryOffset } from './methods/messages/get-history.js'\nexport { getHistory } from './methods/messages/get-history.js'\nexport { getMessageByLink } from './methods/messages/get-message-by-link.js'\nexport { getMessageGroup } from './methods/messages/get-message-group.js'\nexport { getMessageReactionsById } from './methods/messages/get-message-reactions.js'\nexport { getMessageReactions } from './methods/messages/get-message-reactions.js'\nexport { getMessages } from './methods/messages/get-messages.js'\nexport { getMessagesUnsafe } from './methods/messages/get-messages-unsafe.js'\nexport type { GetReactionUsersOffset } from './methods/messages/get-reaction-users.js'\nexport { getReactionUsers } from './methods/messages/get-reaction-users.js'\nexport { getReplyTo } from './methods/messages/get-reply-to.js'\nexport { getScheduledMessages } from './methods/messages/get-scheduled-messages.js'\nexport { iterHistory } from './methods/messages/iter-history.js'\nexport { iterReactionUsers } from './methods/messages/iter-reaction-users.js'\nexport { iterSearchGlobal } from './methods/messages/iter-search-global.js'\nexport { iterSearchMessages } from './methods/messages/iter-search-messages.js'\nexport { pinMessage } from './methods/messages/pin-message.js'\nexport { readHistory } from './methods/messages/read-history.js'\nexport { readReactions } from './methods/messages/read-reactions.js'\nexport type { SearchGlobalOffset } from './methods/messages/search-global.js'\nexport { searchGlobal } from './methods/messages/search-global.js'\nexport type { SearchHashtagOffset } from './methods/messages/search-hashtag.js'\nexport { searchHashtag } from './methods/messages/search-hashtag.js'\nexport { iterSearchHashtag } from './methods/messages/search-hashtag.js'\nexport type { SearchMessagesOffset } from './methods/messages/search-messages.js'\nexport { searchMessages } from './methods/messages/search-messages.js'\nexport { answerText } from './methods/messages/send-answer.js'\nexport { answerMedia } from './methods/messages/send-answer.js'\nexport { answerMediaGroup } from './methods/messages/send-answer.js'\nexport { commentText } from './methods/messages/send-comment.js'\nexport { commentMedia } from './methods/messages/send-comment.js'\nexport { commentMediaGroup } from './methods/messages/send-comment.js'\nexport type { SendCopyParams } from './methods/messages/send-copy.js'\nexport { sendCopy } from './methods/messages/send-copy.js'\nexport type { SendCopyGroupParams } from './methods/messages/send-copy-group.js'\nexport { sendCopyGroup } from './methods/messages/send-copy-group.js'\nexport { sendMedia } from './methods/messages/send-media.js'\nexport { sendMediaGroup } from './methods/messages/send-media-group.js'\nexport type { QuoteParamsFrom } from './methods/messages/send-quote.js'\nexport { quoteWithText } from './methods/messages/send-quote.js'\nexport { quoteWithMedia } from './methods/messages/send-quote.js'\nexport { quoteWithMediaGroup } from './methods/messages/send-quote.js'\nexport { sendReaction } from './methods/messages/send-reaction.js'\nexport { replyText } from './methods/messages/send-reply.js'\nexport { replyMedia } from './methods/messages/send-reply.js'\nexport { replyMediaGroup } from './methods/messages/send-reply.js'\nexport { sendScheduled } from './methods/messages/send-scheduled.js'\nexport { sendText } from './methods/messages/send-text.js'\nexport { sendTyping } from './methods/messages/send-typing.js'\nexport { sendVote } from './methods/messages/send-vote.js'\nexport { translateMessage } from './methods/messages/translate-message.js'\nexport { translateText } from './methods/messages/translate-text.js'\nexport { unpinAllMessages } from './methods/messages/unpin-all-messages.js'\nexport { unpinMessage } from './methods/messages/unpin-message.js'\nexport { getCollectibleInfo } from './methods/misc/get-collectible-info.js'\nexport { initTakeoutSession } from './methods/misc/init-takeout-session.js'\nexport { _normalizePrivacyRules } from './methods/misc/normalize-privacy-rules.js'\nexport { changeCloudPassword } from './methods/password/change-cloud-password.js'\nexport { enableCloudPassword } from './methods/password/enable-cloud-password.js'\nexport { verifyPasswordEmail } from './methods/password/password-email.js'\nexport { resendPasswordEmail } from './methods/password/password-email.js'\nexport { cancelPasswordEmail } from './methods/password/password-email.js'\nexport { removeCloudPassword } from './methods/password/remove-cloud-password.js'\nexport { applyBoost } from './methods/premium/apply-boost.js'\nexport type { CanApplyBoostResult } from './methods/premium/can-apply-boost.js'\nexport { canApplyBoost } from './methods/premium/can-apply-boost.js'\nexport { createBusinessChatLink } from './methods/premium/create-business-chat-link.js'\nexport { editBusinessChatLink } from './methods/premium/edit-business-chat-link.js'\nexport { deleteBusinessChatLink } from './methods/premium/edit-business-chat-link.js'\nexport { getBoostStats } from './methods/premium/get-boost-stats.js'\nexport { getBoosts } from './methods/premium/get-boosts.js'\nexport { getBusinessChatLinks } from './methods/premium/get-business-chat-links.js'\nexport { getBusinessConnection } from './methods/premium/get-business-connection.js'\nexport { getMyBoostSlots } from './methods/premium/get-my-boost-slots.js'\nexport { iterBoosters } from './methods/premium/iter-boosters.js'\nexport { setBusinessIntro } from './methods/premium/set-business-intro.js'\nexport { setBusinessWorkHours } from './methods/premium/set-business-work-hours.js'\nexport { addStickerToSet } from './methods/stickers/add-sticker-to-set.js'\nexport { createStickerSet } from './methods/stickers/create-sticker-set.js'\nexport { deleteStickerFromSet } from './methods/stickers/delete-sticker-from-set.js'\nexport { getCustomEmojis } from './methods/stickers/get-custom-emojis.js'\nexport { getCustomEmojisFromMessages } from './methods/stickers/get-custom-emojis.js'\nexport { getInstalledStickers } from './methods/stickers/get-installed-stickers.js'\nexport { getMyStickerSets } from './methods/stickers/get-my-sticker-sets.js'\nexport { getStickerSet } from './methods/stickers/get-sticker-set.js'\nexport { moveStickerInSet } from './methods/stickers/move-sticker-in-set.js'\nexport { replaceStickerInSet } from './methods/stickers/replace-sticker-in-set.js'\nexport { setChatStickerSet } from './methods/stickers/set-chat-sticker-set.js'\nexport { setStickerSetThumb } from './methods/stickers/set-sticker-set-thumb.js'\nexport type { CanSendStoryResult } from './methods/stories/can-send-story.js'\nexport { canSendStory } from './methods/stories/can-send-story.js'\nexport { deleteStories } from './methods/stories/delete-stories.js'\nexport { editStory } from './methods/stories/edit-story.js'\nexport { getAllStories } from './methods/stories/get-all-stories.js'\nexport { getPeerStories } from './methods/stories/get-peer-stories.js'\nexport { getProfileStories } from './methods/stories/get-profile-stories.js'\nexport { getStoriesById } from './methods/stories/get-stories-by-id.js'\nexport { getStoriesInteractions } from './methods/stories/get-stories-interactions.js'\nexport { getStoryLink } from './methods/stories/get-story-link.js'\nexport { getStoryViewers } from './methods/stories/get-story-viewers.js'\nexport { hideMyStoriesViews } from './methods/stories/hide-my-stories-views.js'\nexport { incrementStoriesViews } from './methods/stories/increment-stories-views.js'\nexport { iterAllStories } from './methods/stories/iter-all-stories.js'\nexport { iterProfileStories } from './methods/stories/iter-profile-stories.js'\nexport { iterStoryViewers } from './methods/stories/iter-story-viewers.js'\nexport { readStories } from './methods/stories/read-stories.js'\nexport { reportStory } from './methods/stories/report-story.js'\nexport { sendStory } from './methods/stories/send-story.js'\nexport { sendStoryReaction } from './methods/stories/send-story-reaction.js'\nexport { togglePeerStoriesArchived } from './methods/stories/toggle-peer-stories-archived.js'\nexport { toggleStoriesPinned } from './methods/stories/toggle-stories-pinned.js'\nexport { blockUser } from './methods/users/block-user.js'\nexport { deleteProfilePhotos } from './methods/users/delete-profile-photos.js'\nexport { editCloseFriendsRaw } from './methods/users/edit-close-friends.js'\nexport { editCloseFriends } from './methods/users/edit-close-friends.js'\nexport { getCommonChats } from './methods/users/get-common-chats.js'\nexport { getGlobalTtl } from './methods/users/get-global-ttl.js'\nexport { getMe } from './methods/users/get-me.js'\nexport { getMyUsername } from './methods/users/get-my-username.js'\nexport { getProfilePhoto } from './methods/users/get-profile-photo.js'\nexport { getProfilePhotos } from './methods/users/get-profile-photos.js'\nexport { getUsers } from './methods/users/get-users.js'\nexport { iterProfilePhotos } from './methods/users/iter-profile-photos.js'\nexport { resolvePeer } from './methods/users/resolve-peer.js'\nexport { resolveUser } from './methods/users/resolve-peer.js'\nexport { resolveChannel } from './methods/users/resolve-peer.js'\nexport { resolvePeerMany } from './methods/users/resolve-peer-many.js'\nexport { setGlobalTtl } from './methods/users/set-global-ttl.js'\nexport { setMyBirthday } from './methods/users/set-my-birthday.js'\nexport { setMyEmojiStatus } from './methods/users/set-my-emoji-status.js'\nexport { setMyProfilePhoto } from './methods/users/set-my-profile-photo.js'\nexport { setMyUsername } from './methods/users/set-my-username.js'\nexport { setOffline } from './methods/users/set-offline.js'\nexport { unblockUser } from './methods/users/unblock-user.js'\nexport { updateProfile } from './methods/users/update-profile.js'\n"]}
@@ -133,7 +133,7 @@ class Conversation {
133
133
  this._inputPeer = await (0, resolve_peer_js_1.resolvePeer)(this.client, this.chat);
134
134
  this._chatId = (0, peer_utils_js_1.getMarkedPeerId)(this._inputPeer);
135
135
  const [dialog] = await (0, get_peer_dialogs_js_1.getPeerDialogs)(this.client, this._inputPeer);
136
- const lastMessage = dialog.lastMessage;
136
+ const lastMessage = dialog?.lastMessage;
137
137
  if (lastMessage) {
138
138
  this._lastMessage = this._lastReceivedMessage = lastMessage.id;
139
139
  }
@@ -1 +1 @@
1
- {"version":3,"file":"conversation.js","sourceRoot":"","sources":["../../../../src/highlevel/types/conversation.ts"],"names":[],"mappings":";;;AAEA,qDAAuE;AAEvE,6DAAqD;AACrD,iFAAoG;AACpG,mDAA4C;AAC5C,6DAA2D;AAE3D,gFAAuE;AACvE,yEAAiE;AACjE,qEAA6D;AAC7D,iFAAwE;AACxE,mEAA2D;AAC3D,sEAA8D;AAY9D,MAAM,mBAAmB,GAAG,MAAM,CAAC,cAAc,CAAC,CAAA;AAOlD;;;;;;;;;;GAUG;AACH,MAAa,YAAY;IAkBR;IACA;IAlBL,UAAU,CAAmB;IAC7B,OAAO,CAAS;IAChB,QAAQ,GAAG,KAAK,CAAA;IAEhB,YAAY,CAAS;IACrB,oBAAoB,CAAS;IAE7B,iBAAiB,GAAG,IAAI,gBAAK,EAA0B,CAAA;IACvD,mBAAmB,GAAG,IAAI,gBAAK,EAAW,CAAA;IAC1C,KAAK,GAAG,IAAI,yBAAS,EAAE,CAAA;IAEvB,mBAAmB,GAAwC,IAAI,GAAG,EAAE,CAAA;IACpE,YAAY,GAAG,IAAI,gBAAK,CAAU,EAAE,CAAC,CAAA;IAErC,YAAY,GAAqC,IAAI,GAAG,EAAE,CAAA;IAElE,YACa,MAAuB,EACvB,IAAmB;QADnB,WAAM,GAAN,MAAM,CAAiB;QACvB,SAAI,GAAJ,IAAI,CAAe;QAE5B,IAAI,CAAC,CAAC,mBAAmB,IAAI,MAAM,CAAC,EAAE,CAAC;YACnC,8DA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AAS,CAAA;QAE9B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC;YAC3C,IAAI,KAAK,IAAI,QAAQ,EAAE,CAAC;gBACpB,MAAM,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAE,CAAA;gBACxC,IAAI,EAAE,CAAC,OAAO;oBAAE,YAAY,CAAC,EAAE,CAAC,OAAO,CAAC,CAAA;gBACxC,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,CAAA;gBACpB,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;YACnC,CAAC;QACL,CAAC;IACL,CAAC;IAEO,0BAA0B;QAC9B,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,MAAM;YAAE,OAAM;QAE5C,IAAI,EAAE,CAAA;QAEN,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC;YAChD,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,CAAA;QAC1B,CAAC;IACL,CAAC;IAEO,mBAAmB;QACvB,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM;YAAE,OAAM;QAErC,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAA;QACrC,IAAI,EAAE,CAAA;QAEN,OAAO,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;YAC9B,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;QACvC,CAAC;IACL,CAAC;CACJ;AAllBD,oCAklBC","sourcesContent":["import { tl } from '@mtcute/tl'\n\nimport { MtArgumentError, MtTimeoutError } from '../../types/errors.js'\nimport { MaybePromise } from '../../types/utils.js'\nimport { AsyncLock } from '../../utils/async-lock.js'\nimport { ControllablePromise, createControllablePromise } from '../../utils/controllable-promise.js'\nimport { Deque } from '../../utils/deque.js'\nimport { getMarkedPeerId } from '../../utils/peer-utils.js'\nimport { ITelegramClient } from '../client.types.js'\nimport { getPeerDialogs } from '../methods/dialogs/get-peer-dialogs.js'\nimport { readHistory } from '../methods/messages/read-history.js'\nimport { sendMedia } from '../methods/messages/send-media.js'\nimport { sendMediaGroup } from '../methods/messages/send-media-group.js'\nimport { sendText } from '../methods/messages/send-text.js'\nimport { resolvePeer } from '../methods/users/resolve-peer.js'\nimport type { Message } from './messages/message.js'\nimport type { InputPeerLike } from './peers/index.js'\nimport type { HistoryReadUpdate, ParsedUpdate } from './updates/index.js'\nimport { ParametersSkip2 } from './utils.js'\n\ninterface QueuedHandler<T> {\n promise: ControllablePromise<T>\n check?: (update: T) => MaybePromise<boolean>\n timeout?: NodeJS.Timeout\n}\n\nconst CONVERSATION_SYMBOL = Symbol('conversation')\n\ninterface ConversationsState {\n pendingConversations: Map<number, Conversation[]>\n hasConversations: boolean\n}\n\n/**\n * Represents a conversation inside some chat.\n *\n * A conversation keeps track of any messages sent or edited\n * since it was started and until it was stopped,\n * and allows waiting for events in it.\n *\n * If you need a conversation across multiple chats,\n * you should use multiple {@link Conversation} objects\n * and synchronize them manually.\n */\nexport class Conversation {\n private _inputPeer!: tl.TypeInputPeer\n private _chatId!: number\n private _started = false\n\n private _lastMessage!: number\n private _lastReceivedMessage!: number\n\n private _queuedNewMessage = new Deque<QueuedHandler<Message>>()\n private _pendingNewMessages = new Deque<Message>()\n private _lock = new AsyncLock()\n\n private _pendingEditMessage: Map<number, QueuedHandler<Message>> = new Map()\n private _recentEdits = new Deque<Message>(10)\n\n private _pendingRead: Map<number, QueuedHandler<void>> = new Map()\n\n constructor(\n readonly client: ITelegramClient,\n readonly chat: InputPeerLike,\n ) {\n if (!(CONVERSATION_SYMBOL in client)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (client as any)[CONVERSATION_SYMBOL] = {\n pendingConversations: new Map(),\n hasConversations: false,\n } satisfies ConversationsState\n }\n }\n\n private static _getState(client: ITelegramClient): ConversationsState {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (client as any)[CONVERSATION_SYMBOL] as ConversationsState\n }\n\n /**\n * Pass the update to the conversation manager and all registered\n * conversations on this client.\n *\n * @returns `true` if the update was handled by some conversation\n */\n static handleUpdate(client: ITelegramClient, update: ParsedUpdate): boolean {\n const state = Conversation._getState(client)\n if (!state?.hasConversations) return false\n\n let chatId\n\n switch (update.name) {\n case 'new_message':\n case 'edit_message':\n chatId = getMarkedPeerId(update.data.raw.peerId)\n break\n case 'history_read':\n chatId = update.data.chatId\n break\n default:\n return false\n }\n\n const conv = state.pendingConversations.get(chatId)\n if (!conv) return false\n\n for (const c of conv) {\n switch (update.name) {\n case 'new_message':\n c._onNewMessage(update.data)\n\n return true\n case 'edit_message':\n c._onEditMessage(update.data)\n\n return true\n case 'history_read':\n c._onHistoryRead(update.data)\n\n return true\n }\n }\n\n return false\n }\n\n /**\n * Get the input peer that this conversation is with\n */\n get inputPeer(): tl.TypeInputPeer {\n if (!this._started) {\n throw new MtArgumentError(\"Conversation hasn't started yet\")\n }\n\n return this._inputPeer\n }\n\n /**\n * ID of the very last message in this conversation.\n */\n get lastMessage(): number {\n if (!this._started) {\n throw new MtArgumentError(\"Conversation hasn't started yet\")\n }\n\n return this._lastMessage\n }\n\n /**\n * ID of the last incoming message in this conversation.\n *\n * Note that before any messages were received since the {@link start}\n * of the conversation, this will equal to {@link lastMessage}\n */\n get lastReceivedMessage(): number {\n if (!this._started) {\n throw new MtArgumentError(\"Conversation hasn't started yet\")\n }\n\n return this._lastReceivedMessage\n }\n\n /**\n * Start the conversation\n */\n async start(): Promise<void> {\n if (this._started) return\n\n this._started = true\n this._inputPeer = await resolvePeer(this.client, this.chat)\n this._chatId = getMarkedPeerId(this._inputPeer)\n\n const [dialog] = await getPeerDialogs(this.client, this._inputPeer)\n const lastMessage = dialog.lastMessage\n\n if (lastMessage) {\n this._lastMessage = this._lastReceivedMessage = lastMessage.id\n } else {\n this._lastMessage = this._lastReceivedMessage = 0\n }\n\n const state = Conversation._getState(this.client)\n\n if (!state.pendingConversations.has(this._chatId)) {\n state.pendingConversations.set(this._chatId, [])\n }\n state.pendingConversations.get(this._chatId)!.push(this)\n state.hasConversations = true\n }\n\n /**\n * Stop the conversation\n */\n stop(): void {\n if (!this._started) return\n\n const state = Conversation._getState(this.client)\n\n const pending = state.pendingConversations.get(this._chatId)\n const pendingIdx = pending?.indexOf(this) ?? -1\n\n if (pendingIdx > -1) {\n // just in case\n pending!.splice(pendingIdx, 1)\n }\n if (pending && !pending.length) {\n state.pendingConversations.delete(this._chatId)\n }\n state.hasConversations = Boolean(state.pendingConversations.size)\n\n // reset pending status\n this._queuedNewMessage.clear()\n this._pendingNewMessages.clear()\n this._pendingEditMessage.clear()\n this._recentEdits.clear()\n this._pendingRead.clear()\n\n this._started = false\n }\n\n private _recordMessage(msg: Message, incoming = false): Message {\n this._lastMessage = msg.id\n if (incoming) this._lastReceivedMessage = msg.id\n\n return msg\n }\n\n /**\n * Send a text message to this conversation.\n *\n * Wrapper over {@link sendText}\n */\n async sendText(...params: ParametersSkip2<typeof sendText>): ReturnType<typeof sendText> {\n if (!this._started) {\n throw new MtArgumentError(\"Conversation hasn't started yet\")\n }\n\n return this._recordMessage(await sendText(this.client, this._inputPeer, ...params))\n }\n\n /**\n * Send a media to this conversation.\n *\n * Wrapper over {@link sendMedia}\n */\n async sendMedia(...params: ParametersSkip2<typeof sendMedia>): ReturnType<typeof sendMedia> {\n if (!this._started) {\n throw new MtArgumentError(\"Conversation hasn't started yet\")\n }\n\n return this._recordMessage(await sendMedia(this.client, this._inputPeer, ...params))\n }\n\n /**\n * Send a media group to this conversation.\n *\n * Wrapper over {@link sendMediaGroup}\n */\n async sendMediaGroup(...params: ParametersSkip2<typeof sendMediaGroup>): ReturnType<typeof sendMediaGroup> {\n if (!this._started) {\n throw new MtArgumentError(\"Conversation hasn't started yet\")\n }\n\n const msgs = await sendMediaGroup(this.client, this._inputPeer, ...params)\n\n this._recordMessage(msgs[msgs.length - 1])\n\n return msgs\n }\n\n /**\n * Mark the conversation as read up to a certain point.\n *\n * By default, reads until the last message.\n * You can pass `message=null` to read the entire conversation,\n * or pass message ID to read up until that ID.\n */\n markRead({\n message,\n clearMentions = true,\n }: { message?: number | null; clearMentions?: boolean } = {}): Promise<void> {\n if (!this._started) {\n throw new MtArgumentError(\"Conversation hasn't started yet\")\n }\n\n if (message === null) {\n message = 0\n } else if (message === undefined) {\n message = this._lastMessage ?? 0\n }\n\n return readHistory(this.client, this._inputPeer, { maxId: message, clearMentions })\n }\n\n /**\n * Helper method that calls {@link start},\n * the provided function and then {@link stop}.\n *\n * It is preferred that you use this function rather than\n * manually starting and stopping the conversation.\n *\n * If you don't stop the conversation when you're done,\n * it *will* lead to memory leaks.\n *\n * @param handler\n */\n async with<T>(handler: () => MaybePromise<T>): Promise<T> {\n await this.start()\n\n let err: unknown\n let res: T\n\n try {\n res = await handler()\n } catch (e) {\n err = e\n }\n\n this.stop()\n\n // eslint-disable-next-line @typescript-eslint/no-throw-literal\n if (err) throw err\n\n return res!\n }\n\n /**\n * Wait for a new message in the conversation\n *\n * @param filter Filter for the handler. You can use any filter you can use for dispatcher\n * @param [timeout=15000] Timeout for the handler in ms. Pass `null` to disable.\n * When the timeout is reached, `MtTimeoutError` is thrown.\n */\n waitForNewMessage(\n filter?: (msg: Message) => MaybePromise<boolean>,\n timeout: number | null = 15000,\n ): Promise<Message> {\n if (!this._started) {\n throw new MtArgumentError(\"Conversation hasn't started yet\")\n }\n\n const promise = createControllablePromise<Message>()\n\n let timer: NodeJS.Timeout | undefined = undefined\n\n if (timeout !== null) {\n timer = setTimeout(() => {\n promise.reject(new MtTimeoutError(timeout))\n this._queuedNewMessage.removeBy((it) => it.promise === promise)\n }, timeout)\n }\n\n this._queuedNewMessage.pushBack({\n promise,\n check: filter,\n timeout: timer,\n })\n\n this._processPendingNewMessages()\n\n return promise\n }\n\n /**\n * Wait for a response for the given message\n * (def. the last one) in the conversation.\n *\n * A message is considered to be a response if\n * it was sent after the given one.\n *\n * @param filter Filter for the handler. You can use any filter you can use for dispatcher\n * @param params\n */\n waitForResponse(\n filter?: (msg: Message) => MaybePromise<boolean>,\n params?: {\n /**\n * Message for which to wait for response for.\n *\n * @default last sent/received message\n */\n message?: number\n\n /**\n * Timeout for the handler in ms. Pass `null` to disable.\n *\n * When the timeout is reached, `TimeoutError` is thrown.\n *\n * @default `15000` (15 sec)\n */\n timeout?: number | null\n },\n ): Promise<Message> {\n const msgId = params?.message ?? this._lastMessage ?? 0\n\n const pred = filter ?\n (msg: Message) => (msg.id > msgId ? filter(msg) : false) :\n (msg: Message) => msg.id > msgId\n\n return this.waitForNewMessage(pred, params?.timeout)\n }\n\n /**\n * Wait for the reply for the given message'\n * (def. the last one) in the conversation.\n *\n * @param filter Filter for the handler. You can use any filter you can use for dispatcher\n * @param params\n */\n waitForReply(\n filter?: (msg: Message) => MaybePromise<boolean>,\n params?: {\n /**\n * Message for which to wait for reply for.\n *\n * @default last sent/received message\n */\n message?: number\n\n /**\n * Timeout for the handler in ms. Pass `null` to disable.\n *\n * When the timeout is reached, `TimeoutError` is thrown.\n *\n * @default `15000` (15 sec)\n */\n timeout?: number | null\n },\n ): Promise<Message> {\n const msgId = params?.message ?? this._lastMessage\n\n if (!msgId) {\n throw new MtArgumentError('Provide message for which to wait for reply for')\n }\n\n const pred = filter ?\n (msg: Message) => (msg.replyToMessage?.id === msgId ? filter(msg) : false) :\n (msg: Message) => msg.replyToMessage?.id === msgId\n\n return this.waitForNewMessage(pred, params?.timeout)\n }\n\n /**\n * Wait for a message to be edited in the conversation.\n * By defaults wait for the last message sent by the other party\n * (at the moment) to be edited.\n *\n * Returns the edited message.\n *\n * @param filter Filter for the handler. You can use any filter you can use for dispatcher\n * @param params\n */\n async waitForEdit(\n filter?: (msg: Message) => MaybePromise<boolean>,\n params?: {\n /**\n * Message for which to wait for reply for.\n *\n * @default last received message\n */\n message?: number\n\n /**\n * Timeout for the handler in ms. Pass `null` to disable.\n *\n * When the timeout is reached, `TimeoutError` is thrown.\n *\n * @default `15000` (15 sec)\n */\n timeout?: number | null\n },\n ): Promise<Message> {\n if (!this._started) {\n throw new MtArgumentError(\"Conversation hasn't started yet\")\n }\n\n const msgId = params?.message ?? this._lastReceivedMessage\n\n if (!msgId) {\n throw new MtArgumentError('Provide message for which to wait for edit for')\n }\n\n const promise = createControllablePromise<Message>()\n\n let timer: NodeJS.Timeout | undefined = undefined\n const timeout = params?.timeout\n\n if (timeout) {\n timer = setTimeout(() => {\n promise.reject(new MtTimeoutError(timeout))\n this._pendingEditMessage.delete(msgId)\n }, timeout)\n }\n\n this._pendingEditMessage.set(msgId, {\n promise,\n check: filter,\n timeout: timer,\n })\n\n this._processRecentEdits()\n\n return promise\n }\n\n /**\n * Wait for the message to be read by the other party.\n *\n * Note that reading the message doesn't mean the response was sent,\n * and if the response was sent, it doesn't mean that the message was read.\n *\n * @param message Message for which to wait for read for. Defaults to last message.\n * @param timeout Timeout for the handler in ms, def. 15 sec. Pass `null` to disable.\n * When the timeout is reached, `TimeoutError` is thrown.\n */\n async waitForRead(message?: number, timeout: number | null = 15000): Promise<void> {\n if (!this._started) {\n throw new MtArgumentError(\"Conversation hasn't started yet\")\n }\n\n const msgId = message ?? this._lastMessage\n\n if (!msgId) {\n throw new MtArgumentError('Provide message for which to wait for read for')\n }\n\n // check if the message is already read\n const [dialog] = await getPeerDialogs(this.client, this._inputPeer)\n if (dialog.lastRead >= msgId) return\n\n const promise = createControllablePromise<void>()\n\n let timer: NodeJS.Timeout | undefined = undefined\n\n if (timeout !== null) {\n timer = setTimeout(() => {\n promise.reject(new MtTimeoutError(timeout))\n this._pendingRead.delete(msgId)\n }, timeout)\n }\n\n this._pendingRead.set(msgId, {\n promise,\n timeout: timer,\n })\n\n return promise\n }\n\n private _onNewMessage(msg: Message) {\n if (msg.chat.id !== this._chatId) return\n\n if (!this._queuedNewMessage.length) {\n this._pendingNewMessages.pushBack(msg)\n\n return\n }\n\n const it = this._queuedNewMessage.peekFront()!\n\n // order does matter for new messages\n void this._lock.acquire().then(async () => {\n try {\n if (!it.check || (await it.check(msg))) {\n if (it.timeout) clearTimeout(it.timeout)\n it.promise.resolve(msg)\n this._queuedNewMessage.popFront()\n }\n } catch (e: unknown) {\n this.client.emitError(e)\n }\n\n this._lastMessage = this._lastReceivedMessage = msg.id\n\n // this func will *never* error, so no need to use .then\n this._lock.release()\n })\n }\n\n private _onEditMessage(msg: Message, fromRecent = false) {\n if (msg.chat.id !== this._chatId) return\n\n const it = this._pendingEditMessage.get(msg.id)\n\n if (!it) {\n if (!fromRecent) {\n this._recentEdits.pushBack(msg)\n }\n\n return\n }\n\n (async () => {\n if (!it.check || (await it.check(msg))) {\n if (it.timeout) clearTimeout(it.timeout)\n it.promise.resolve(msg)\n this._pendingEditMessage.delete(msg.id)\n }\n })().catch((e) => {\n this.client.emitError(e)\n })\n }\n\n private _onHistoryRead(upd: HistoryReadUpdate) {\n if (upd.chatId !== this._chatId) return\n\n const lastRead = upd.maxReadId\n\n for (const msgId of this._pendingRead.keys()) {\n if (msgId <= lastRead) {\n const it = this._pendingRead.get(msgId)!\n if (it.timeout) clearTimeout(it.timeout)\n it.promise.resolve()\n this._pendingRead.delete(msgId)\n }\n }\n }\n\n private _processPendingNewMessages() {\n if (!this._pendingNewMessages.length) return\n\n let it\n\n while ((it = this._pendingNewMessages.popFront())) {\n this._onNewMessage(it)\n }\n }\n\n private _processRecentEdits() {\n if (!this._recentEdits.length) return\n\n const iter = this._recentEdits.iter()\n let it\n\n while (!(it = iter.next()).done) {\n this._onEditMessage(it.value, true)\n }\n }\n}\n"]}
1
+ {"version":3,"file":"conversation.js","sourceRoot":"","sources":["../../../../src/highlevel/types/conversation.ts"],"names":[],"mappings":";;;AAEA,qDAAuE;AAEvE,6DAAqD;AACrD,iFAAoG;AACpG,mDAA4C;AAC5C,6DAA2D;AAE3D,gFAA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AAC,mBAAmB,CAAC,MAAM;YAAE,OAAM;QAE5C,IAAI,EAAE,CAAA;QAEN,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC;YAChD,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,CAAA;QAC1B,CAAC;IACL,CAAC;IAEO,mBAAmB;QACvB,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM;YAAE,OAAM;QAErC,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAA;QACrC,IAAI,EAAE,CAAA;QAEN,OAAO,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;YAC9B,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;QACvC,CAAC;IACL,CAAC;CACJ;AAnlBD,oCAmlBC","sourcesContent":["import { tl } from '@mtcute/tl'\n\nimport { MtArgumentError, MtTimeoutError } from '../../types/errors.js'\nimport { MaybePromise } from '../../types/utils.js'\nimport { AsyncLock } from '../../utils/async-lock.js'\nimport { ControllablePromise, createControllablePromise } from '../../utils/controllable-promise.js'\nimport { Deque } from '../../utils/deque.js'\nimport { getMarkedPeerId } from '../../utils/peer-utils.js'\nimport { ITelegramClient } from '../client.types.js'\nimport { getPeerDialogs } from '../methods/dialogs/get-peer-dialogs.js'\nimport { readHistory } from '../methods/messages/read-history.js'\nimport { sendMedia } from '../methods/messages/send-media.js'\nimport { sendMediaGroup } from '../methods/messages/send-media-group.js'\nimport { sendText } from '../methods/messages/send-text.js'\nimport { resolvePeer } from '../methods/users/resolve-peer.js'\nimport type { Message } from './messages/message.js'\nimport type { InputPeerLike } from './peers/index.js'\nimport type { HistoryReadUpdate, ParsedUpdate } from './updates/index.js'\nimport { ParametersSkip2 } from './utils.js'\n\ninterface QueuedHandler<T> {\n promise: ControllablePromise<T>\n check?: (update: T) => MaybePromise<boolean>\n timeout?: NodeJS.Timeout\n}\n\nconst CONVERSATION_SYMBOL = Symbol('conversation')\n\ninterface ConversationsState {\n pendingConversations: Map<number, Conversation[]>\n hasConversations: boolean\n}\n\n/**\n * Represents a conversation inside some chat.\n *\n * A conversation keeps track of any messages sent or edited\n * since it was started and until it was stopped,\n * and allows waiting for events in it.\n *\n * If you need a conversation across multiple chats,\n * you should use multiple {@link Conversation} objects\n * and synchronize them manually.\n */\nexport class Conversation {\n private _inputPeer!: tl.TypeInputPeer\n private _chatId!: number\n private _started = false\n\n private _lastMessage!: number\n private _lastReceivedMessage!: number\n\n private _queuedNewMessage = new Deque<QueuedHandler<Message>>()\n private _pendingNewMessages = new Deque<Message>()\n private _lock = new AsyncLock()\n\n private _pendingEditMessage: Map<number, QueuedHandler<Message>> = new Map()\n private _recentEdits = new Deque<Message>(10)\n\n private _pendingRead: Map<number, QueuedHandler<void>> = new Map()\n\n constructor(\n readonly client: ITelegramClient,\n readonly chat: InputPeerLike,\n ) {\n if (!(CONVERSATION_SYMBOL in client)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (client as any)[CONVERSATION_SYMBOL] = {\n pendingConversations: new Map(),\n hasConversations: false,\n } satisfies ConversationsState\n }\n }\n\n private static _getState(client: ITelegramClient): ConversationsState {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (client as any)[CONVERSATION_SYMBOL] as ConversationsState\n }\n\n /**\n * Pass the update to the conversation manager and all registered\n * conversations on this client.\n *\n * @returns `true` if the update was handled by some conversation\n */\n static handleUpdate(client: ITelegramClient, update: ParsedUpdate): boolean {\n const state = Conversation._getState(client)\n if (!state?.hasConversations) return false\n\n let chatId\n\n switch (update.name) {\n case 'new_message':\n case 'edit_message':\n chatId = getMarkedPeerId(update.data.raw.peerId)\n break\n case 'history_read':\n chatId = update.data.chatId\n break\n default:\n return false\n }\n\n const conv = state.pendingConversations.get(chatId)\n if (!conv) return false\n\n for (const c of conv) {\n switch (update.name) {\n case 'new_message':\n c._onNewMessage(update.data)\n\n return true\n case 'edit_message':\n c._onEditMessage(update.data)\n\n return true\n case 'history_read':\n c._onHistoryRead(update.data)\n\n return true\n }\n }\n\n return false\n }\n\n /**\n * Get the input peer that this conversation is with\n */\n get inputPeer(): tl.TypeInputPeer {\n if (!this._started) {\n throw new MtArgumentError(\"Conversation hasn't started yet\")\n }\n\n return this._inputPeer\n }\n\n /**\n * ID of the very last message in this conversation.\n */\n get lastMessage(): number {\n if (!this._started) {\n throw new MtArgumentError(\"Conversation hasn't started yet\")\n }\n\n return this._lastMessage\n }\n\n /**\n * ID of the last incoming message in this conversation.\n *\n * Note that before any messages were received since the {@link start}\n * of the conversation, this will equal to {@link lastMessage}\n */\n get lastReceivedMessage(): number {\n if (!this._started) {\n throw new MtArgumentError(\"Conversation hasn't started yet\")\n }\n\n return this._lastReceivedMessage\n }\n\n /**\n * Start the conversation\n */\n async start(): Promise<void> {\n if (this._started) return\n\n this._started = true\n this._inputPeer = await resolvePeer(this.client, this.chat)\n this._chatId = getMarkedPeerId(this._inputPeer)\n\n const [dialog] = await getPeerDialogs(this.client, this._inputPeer)\n\n const lastMessage = dialog?.lastMessage\n\n if (lastMessage) {\n this._lastMessage = this._lastReceivedMessage = lastMessage.id\n } else {\n this._lastMessage = this._lastReceivedMessage = 0\n }\n\n const state = Conversation._getState(this.client)\n\n if (!state.pendingConversations.has(this._chatId)) {\n state.pendingConversations.set(this._chatId, [])\n }\n state.pendingConversations.get(this._chatId)!.push(this)\n state.hasConversations = true\n }\n\n /**\n * Stop the conversation\n */\n stop(): void {\n if (!this._started) return\n\n const state = Conversation._getState(this.client)\n\n const pending = state.pendingConversations.get(this._chatId)\n const pendingIdx = pending?.indexOf(this) ?? -1\n\n if (pendingIdx > -1) {\n // just in case\n pending!.splice(pendingIdx, 1)\n }\n if (pending && !pending.length) {\n state.pendingConversations.delete(this._chatId)\n }\n state.hasConversations = Boolean(state.pendingConversations.size)\n\n // reset pending status\n this._queuedNewMessage.clear()\n this._pendingNewMessages.clear()\n this._pendingEditMessage.clear()\n this._recentEdits.clear()\n this._pendingRead.clear()\n\n this._started = false\n }\n\n private _recordMessage(msg: Message, incoming = false): Message {\n this._lastMessage = msg.id\n if (incoming) this._lastReceivedMessage = msg.id\n\n return msg\n }\n\n /**\n * Send a text message to this conversation.\n *\n * Wrapper over {@link sendText}\n */\n async sendText(...params: ParametersSkip2<typeof sendText>): ReturnType<typeof sendText> {\n if (!this._started) {\n throw new MtArgumentError(\"Conversation hasn't started yet\")\n }\n\n return this._recordMessage(await sendText(this.client, this._inputPeer, ...params))\n }\n\n /**\n * Send a media to this conversation.\n *\n * Wrapper over {@link sendMedia}\n */\n async sendMedia(...params: ParametersSkip2<typeof sendMedia>): ReturnType<typeof sendMedia> {\n if (!this._started) {\n throw new MtArgumentError(\"Conversation hasn't started yet\")\n }\n\n return this._recordMessage(await sendMedia(this.client, this._inputPeer, ...params))\n }\n\n /**\n * Send a media group to this conversation.\n *\n * Wrapper over {@link sendMediaGroup}\n */\n async sendMediaGroup(...params: ParametersSkip2<typeof sendMediaGroup>): ReturnType<typeof sendMediaGroup> {\n if (!this._started) {\n throw new MtArgumentError(\"Conversation hasn't started yet\")\n }\n\n const msgs = await sendMediaGroup(this.client, this._inputPeer, ...params)\n\n this._recordMessage(msgs[msgs.length - 1])\n\n return msgs\n }\n\n /**\n * Mark the conversation as read up to a certain point.\n *\n * By default, reads until the last message.\n * You can pass `message=null` to read the entire conversation,\n * or pass message ID to read up until that ID.\n */\n markRead({\n message,\n clearMentions = true,\n }: { message?: number | null; clearMentions?: boolean } = {}): Promise<void> {\n if (!this._started) {\n throw new MtArgumentError(\"Conversation hasn't started yet\")\n }\n\n if (message === null) {\n message = 0\n } else if (message === undefined) {\n message = this._lastMessage ?? 0\n }\n\n return readHistory(this.client, this._inputPeer, { maxId: message, clearMentions })\n }\n\n /**\n * Helper method that calls {@link start},\n * the provided function and then {@link stop}.\n *\n * It is preferred that you use this function rather than\n * manually starting and stopping the conversation.\n *\n * If you don't stop the conversation when you're done,\n * it *will* lead to memory leaks.\n *\n * @param handler\n */\n async with<T>(handler: () => MaybePromise<T>): Promise<T> {\n await this.start()\n\n let err: unknown\n let res: T\n\n try {\n res = await handler()\n } catch (e) {\n err = e\n }\n\n this.stop()\n\n // eslint-disable-next-line @typescript-eslint/no-throw-literal\n if (err) throw err\n\n return res!\n }\n\n /**\n * Wait for a new message in the conversation\n *\n * @param filter Filter for the handler. You can use any filter you can use for dispatcher\n * @param [timeout=15000] Timeout for the handler in ms. Pass `null` to disable.\n * When the timeout is reached, `MtTimeoutError` is thrown.\n */\n waitForNewMessage(\n filter?: (msg: Message) => MaybePromise<boolean>,\n timeout: number | null = 15000,\n ): Promise<Message> {\n if (!this._started) {\n throw new MtArgumentError(\"Conversation hasn't started yet\")\n }\n\n const promise = createControllablePromise<Message>()\n\n let timer: NodeJS.Timeout | undefined = undefined\n\n if (timeout !== null) {\n timer = setTimeout(() => {\n promise.reject(new MtTimeoutError(timeout))\n this._queuedNewMessage.removeBy((it) => it.promise === promise)\n }, timeout)\n }\n\n this._queuedNewMessage.pushBack({\n promise,\n check: filter,\n timeout: timer,\n })\n\n this._processPendingNewMessages()\n\n return promise\n }\n\n /**\n * Wait for a response for the given message\n * (def. the last one) in the conversation.\n *\n * A message is considered to be a response if\n * it was sent after the given one.\n *\n * @param filter Filter for the handler. You can use any filter you can use for dispatcher\n * @param params\n */\n waitForResponse(\n filter?: (msg: Message) => MaybePromise<boolean>,\n params?: {\n /**\n * Message for which to wait for response for.\n *\n * @default last sent/received message\n */\n message?: number\n\n /**\n * Timeout for the handler in ms. Pass `null` to disable.\n *\n * When the timeout is reached, `TimeoutError` is thrown.\n *\n * @default `15000` (15 sec)\n */\n timeout?: number | null\n },\n ): Promise<Message> {\n const msgId = params?.message ?? this._lastMessage ?? 0\n\n const pred = filter ?\n (msg: Message) => (msg.id > msgId ? filter(msg) : false) :\n (msg: Message) => msg.id > msgId\n\n return this.waitForNewMessage(pred, params?.timeout)\n }\n\n /**\n * Wait for the reply for the given message'\n * (def. the last one) in the conversation.\n *\n * @param filter Filter for the handler. You can use any filter you can use for dispatcher\n * @param params\n */\n waitForReply(\n filter?: (msg: Message) => MaybePromise<boolean>,\n params?: {\n /**\n * Message for which to wait for reply for.\n *\n * @default last sent/received message\n */\n message?: number\n\n /**\n * Timeout for the handler in ms. Pass `null` to disable.\n *\n * When the timeout is reached, `TimeoutError` is thrown.\n *\n * @default `15000` (15 sec)\n */\n timeout?: number | null\n },\n ): Promise<Message> {\n const msgId = params?.message ?? this._lastMessage\n\n if (!msgId) {\n throw new MtArgumentError('Provide message for which to wait for reply for')\n }\n\n const pred = filter ?\n (msg: Message) => (msg.replyToMessage?.id === msgId ? filter(msg) : false) :\n (msg: Message) => msg.replyToMessage?.id === msgId\n\n return this.waitForNewMessage(pred, params?.timeout)\n }\n\n /**\n * Wait for a message to be edited in the conversation.\n * By defaults wait for the last message sent by the other party\n * (at the moment) to be edited.\n *\n * Returns the edited message.\n *\n * @param filter Filter for the handler. You can use any filter you can use for dispatcher\n * @param params\n */\n async waitForEdit(\n filter?: (msg: Message) => MaybePromise<boolean>,\n params?: {\n /**\n * Message for which to wait for reply for.\n *\n * @default last received message\n */\n message?: number\n\n /**\n * Timeout for the handler in ms. Pass `null` to disable.\n *\n * When the timeout is reached, `TimeoutError` is thrown.\n *\n * @default `15000` (15 sec)\n */\n timeout?: number | null\n },\n ): Promise<Message> {\n if (!this._started) {\n throw new MtArgumentError(\"Conversation hasn't started yet\")\n }\n\n const msgId = params?.message ?? this._lastReceivedMessage\n\n if (!msgId) {\n throw new MtArgumentError('Provide message for which to wait for edit for')\n }\n\n const promise = createControllablePromise<Message>()\n\n let timer: NodeJS.Timeout | undefined = undefined\n const timeout = params?.timeout\n\n if (timeout) {\n timer = setTimeout(() => {\n promise.reject(new MtTimeoutError(timeout))\n this._pendingEditMessage.delete(msgId)\n }, timeout)\n }\n\n this._pendingEditMessage.set(msgId, {\n promise,\n check: filter,\n timeout: timer,\n })\n\n this._processRecentEdits()\n\n return promise\n }\n\n /**\n * Wait for the message to be read by the other party.\n *\n * Note that reading the message doesn't mean the response was sent,\n * and if the response was sent, it doesn't mean that the message was read.\n *\n * @param message Message for which to wait for read for. Defaults to last message.\n * @param timeout Timeout for the handler in ms, def. 15 sec. Pass `null` to disable.\n * When the timeout is reached, `TimeoutError` is thrown.\n */\n async waitForRead(message?: number, timeout: number | null = 15000): Promise<void> {\n if (!this._started) {\n throw new MtArgumentError(\"Conversation hasn't started yet\")\n }\n\n const msgId = message ?? this._lastMessage\n\n if (!msgId) {\n throw new MtArgumentError('Provide message for which to wait for read for')\n }\n\n // check if the message is already read\n const [dialog] = await getPeerDialogs(this.client, this._inputPeer)\n if (dialog.lastRead >= msgId) return\n\n const promise = createControllablePromise<void>()\n\n let timer: NodeJS.Timeout | undefined = undefined\n\n if (timeout !== null) {\n timer = setTimeout(() => {\n promise.reject(new MtTimeoutError(timeout))\n this._pendingRead.delete(msgId)\n }, timeout)\n }\n\n this._pendingRead.set(msgId, {\n promise,\n timeout: timer,\n })\n\n return promise\n }\n\n private _onNewMessage(msg: Message) {\n if (msg.chat.id !== this._chatId) return\n\n if (!this._queuedNewMessage.length) {\n this._pendingNewMessages.pushBack(msg)\n\n return\n }\n\n const it = this._queuedNewMessage.peekFront()!\n\n // order does matter for new messages\n void this._lock.acquire().then(async () => {\n try {\n if (!it.check || (await it.check(msg))) {\n if (it.timeout) clearTimeout(it.timeout)\n it.promise.resolve(msg)\n this._queuedNewMessage.popFront()\n }\n } catch (e: unknown) {\n this.client.emitError(e)\n }\n\n this._lastMessage = this._lastReceivedMessage = msg.id\n\n // this func will *never* error, so no need to use .then\n this._lock.release()\n })\n }\n\n private _onEditMessage(msg: Message, fromRecent = false) {\n if (msg.chat.id !== this._chatId) return\n\n const it = this._pendingEditMessage.get(msg.id)\n\n if (!it) {\n if (!fromRecent) {\n this._recentEdits.pushBack(msg)\n }\n\n return\n }\n\n (async () => {\n if (!it.check || (await it.check(msg))) {\n if (it.timeout) clearTimeout(it.timeout)\n it.promise.resolve(msg)\n this._pendingEditMessage.delete(msg.id)\n }\n })().catch((e) => {\n this.client.emitError(e)\n })\n }\n\n private _onHistoryRead(upd: HistoryReadUpdate) {\n if (upd.chatId !== this._chatId) return\n\n const lastRead = upd.maxReadId\n\n for (const msgId of this._pendingRead.keys()) {\n if (msgId <= lastRead) {\n const it = this._pendingRead.get(msgId)!\n if (it.timeout) clearTimeout(it.timeout)\n it.promise.resolve()\n this._pendingRead.delete(msgId)\n }\n }\n }\n\n private _processPendingNewMessages() {\n if (!this._pendingNewMessages.length) return\n\n let it\n\n while ((it = this._pendingNewMessages.popFront())) {\n this._onNewMessage(it)\n }\n }\n\n private _processRecentEdits() {\n if (!this._recentEdits.length) return\n\n const iter = this._recentEdits.iter()\n let it\n\n while (!(it = iter.next()).done) {\n this._onEditMessage(it.value, true)\n }\n }\n}\n"]}
@@ -70,9 +70,9 @@ export declare class Dialog {
70
70
  */
71
71
  get chat(): Chat;
72
72
  /**
73
- * The latest message sent in this chat
73
+ * The latest message sent in this chat (if any)
74
74
  */
75
- get lastMessage(): Message;
75
+ get lastMessage(): Message | null;
76
76
  /**
77
77
  * ID of the last read outgoing message in this dialog
78
78
  */
@@ -5,7 +5,6 @@ const peer_utils_js_1 = require("../../../utils/peer-utils.js");
5
5
  const type_assertions_js_1 = require("../../../utils/type-assertions.js");
6
6
  const index_js_1 = require("../../utils/index.js");
7
7
  const memoize_js_1 = require("../../utils/memoize.js");
8
- const errors_js_1 = require("../errors.js");
9
8
  const chat_js_1 = require("../peers/chat.js");
10
9
  const peers_index_js_1 = require("../peers/peers-index.js");
11
10
  const draft_message_js_1 = require("./draft-message.js");
@@ -172,14 +171,14 @@ class Dialog {
172
171
  return chat_js_1.Chat._parseFromPeer(this.raw.peer, this._peers);
173
172
  }
174
173
  /**
175
- * The latest message sent in this chat
174
+ * The latest message sent in this chat (if any)
176
175
  */
177
176
  get lastMessage() {
178
177
  const cid = this.chat.id;
179
178
  if (this._messages.has(cid)) {
180
179
  return new message_js_1.Message(this._messages.get(cid), this._peers);
181
180
  }
182
- throw new errors_js_1.MtMessageNotFoundError(cid, 0);
181
+ return null;
183
182
  }
184
183
  /**
185
184
  * ID of the last read outgoing message in this dialog