fca-smart-shankar 1.5.6 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (360) hide show
  1. package/.cache/nix/binary-cache-v6.sqlite +0 -0
  2. package/.cache/replit/env/latest +116 -47
  3. package/.cache/replit/env/latest.json +1 -1
  4. package/.cache/replit/modules/nix.res +1 -0
  5. package/.cache/replit/modules/nodejs-20.res +1 -0
  6. package/.cache/replit/nix/env.json +1 -0
  7. package/.cache/typescript/5.6/node_modules/.package-lock.json +171 -0
  8. package/.cache/typescript/5.6/node_modules/@types/bluebird/LICENSE +21 -0
  9. package/.cache/typescript/5.6/node_modules/@types/bluebird/README.md +15 -0
  10. package/.cache/typescript/5.6/node_modules/@types/bluebird/index.d.ts +1365 -0
  11. package/.cache/typescript/5.6/node_modules/@types/bluebird/package.json +25 -0
  12. package/.cache/typescript/5.6/node_modules/@types/caseless/LICENSE +21 -0
  13. package/.cache/typescript/5.6/node_modules/@types/caseless/README.md +48 -0
  14. package/.cache/typescript/5.6/node_modules/@types/caseless/index.d.ts +29 -0
  15. package/.cache/typescript/5.6/node_modules/@types/caseless/package.json +35 -0
  16. package/.cache/typescript/5.6/node_modules/@types/cheerio/LICENSE +21 -0
  17. package/.cache/typescript/5.6/node_modules/@types/cheerio/README.md +15 -0
  18. package/.cache/typescript/5.6/node_modules/@types/cheerio/index.d.ts +318 -0
  19. package/.cache/typescript/5.6/node_modules/@types/cheerio/package.json +71 -0
  20. package/.cache/typescript/5.6/node_modules/@types/mocha/LICENSE +21 -0
  21. package/.cache/typescript/5.6/node_modules/@types/mocha/README.md +15 -0
  22. package/.cache/typescript/5.6/node_modules/@types/mocha/index.d.ts +2929 -0
  23. package/.cache/typescript/5.6/node_modules/@types/mocha/package.json +56 -0
  24. package/.cache/typescript/5.6/node_modules/@types/node/LICENSE +21 -0
  25. package/.cache/typescript/5.6/node_modules/@types/node/README.md +15 -0
  26. package/.cache/typescript/5.6/node_modules/@types/node/assert/strict.d.ts +8 -0
  27. package/.cache/typescript/5.6/node_modules/@types/node/assert.d.ts +1040 -0
  28. package/.cache/typescript/5.6/node_modules/@types/node/async_hooks.d.ts +541 -0
  29. package/.cache/typescript/5.6/node_modules/@types/node/buffer.buffer.d.ts +385 -0
  30. package/.cache/typescript/5.6/node_modules/@types/node/buffer.d.ts +1933 -0
  31. package/.cache/typescript/5.6/node_modules/@types/node/child_process.d.ts +1549 -0
  32. package/.cache/typescript/5.6/node_modules/@types/node/cluster.d.ts +579 -0
  33. package/.cache/typescript/5.6/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
  34. package/.cache/typescript/5.6/node_modules/@types/node/compatibility/index.d.ts +9 -0
  35. package/.cache/typescript/5.6/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
  36. package/.cache/typescript/5.6/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  37. package/.cache/typescript/5.6/node_modules/@types/node/console.d.ts +452 -0
  38. package/.cache/typescript/5.6/node_modules/@types/node/constants.d.ts +19 -0
  39. package/.cache/typescript/5.6/node_modules/@types/node/crypto.d.ts +4475 -0
  40. package/.cache/typescript/5.6/node_modules/@types/node/dgram.d.ts +596 -0
  41. package/.cache/typescript/5.6/node_modules/@types/node/diagnostics_channel.d.ts +554 -0
  42. package/.cache/typescript/5.6/node_modules/@types/node/dns/promises.d.ts +476 -0
  43. package/.cache/typescript/5.6/node_modules/@types/node/dns.d.ts +865 -0
  44. package/.cache/typescript/5.6/node_modules/@types/node/dom-events.d.ts +124 -0
  45. package/.cache/typescript/5.6/node_modules/@types/node/domain.d.ts +170 -0
  46. package/.cache/typescript/5.6/node_modules/@types/node/events.d.ts +931 -0
  47. package/.cache/typescript/5.6/node_modules/@types/node/fs/promises.d.ts +1275 -0
  48. package/.cache/typescript/5.6/node_modules/@types/node/fs.d.ts +4396 -0
  49. package/.cache/typescript/5.6/node_modules/@types/node/globals.d.ts +566 -0
  50. package/.cache/typescript/5.6/node_modules/@types/node/globals.typedarray.d.ts +21 -0
  51. package/.cache/typescript/5.6/node_modules/@types/node/http.d.ts +1958 -0
  52. package/.cache/typescript/5.6/node_modules/@types/node/http2.d.ts +2558 -0
  53. package/.cache/typescript/5.6/node_modules/@types/node/https.d.ts +543 -0
  54. package/.cache/typescript/5.6/node_modules/@types/node/index.d.ts +92 -0
  55. package/.cache/typescript/5.6/node_modules/@types/node/inspector.d.ts +3966 -0
  56. package/.cache/typescript/5.6/node_modules/@types/node/module.d.ts +402 -0
  57. package/.cache/typescript/5.6/node_modules/@types/node/net.d.ts +1001 -0
  58. package/.cache/typescript/5.6/node_modules/@types/node/os.d.ts +495 -0
  59. package/.cache/typescript/5.6/node_modules/@types/node/package.json +220 -0
  60. package/.cache/typescript/5.6/node_modules/@types/node/path.d.ts +200 -0
  61. package/.cache/typescript/5.6/node_modules/@types/node/perf_hooks.d.ts +965 -0
  62. package/.cache/typescript/5.6/node_modules/@types/node/process.d.ts +1963 -0
  63. package/.cache/typescript/5.6/node_modules/@types/node/punycode.d.ts +117 -0
  64. package/.cache/typescript/5.6/node_modules/@types/node/querystring.d.ts +153 -0
  65. package/.cache/typescript/5.6/node_modules/@types/node/readline/promises.d.ts +162 -0
  66. package/.cache/typescript/5.6/node_modules/@types/node/readline.d.ts +589 -0
  67. package/.cache/typescript/5.6/node_modules/@types/node/repl.d.ts +430 -0
  68. package/.cache/typescript/5.6/node_modules/@types/node/sea.d.ts +153 -0
  69. package/.cache/typescript/5.6/node_modules/@types/node/sqlite.d.ts +213 -0
  70. package/.cache/typescript/5.6/node_modules/@types/node/stream/consumers.d.ts +12 -0
  71. package/.cache/typescript/5.6/node_modules/@types/node/stream/promises.d.ts +90 -0
  72. package/.cache/typescript/5.6/node_modules/@types/node/stream/web.d.ts +609 -0
  73. package/.cache/typescript/5.6/node_modules/@types/node/stream.d.ts +1726 -0
  74. package/.cache/typescript/5.6/node_modules/@types/node/string_decoder.d.ts +67 -0
  75. package/.cache/typescript/5.6/node_modules/@types/node/test.d.ts +2248 -0
  76. package/.cache/typescript/5.6/node_modules/@types/node/timers/promises.d.ts +97 -0
  77. package/.cache/typescript/5.6/node_modules/@types/node/timers.d.ts +240 -0
  78. package/.cache/typescript/5.6/node_modules/@types/node/tls.d.ts +1226 -0
  79. package/.cache/typescript/5.6/node_modules/@types/node/trace_events.d.ts +197 -0
  80. package/.cache/typescript/5.6/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +385 -0
  81. package/.cache/typescript/5.6/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +19 -0
  82. package/.cache/typescript/5.6/node_modules/@types/node/ts5.6/index.d.ts +92 -0
  83. package/.cache/typescript/5.6/node_modules/@types/node/tty.d.ts +208 -0
  84. package/.cache/typescript/5.6/node_modules/@types/node/url.d.ts +972 -0
  85. package/.cache/typescript/5.6/node_modules/@types/node/util.d.ts +2371 -0
  86. package/.cache/typescript/5.6/node_modules/@types/node/v8.d.ts +808 -0
  87. package/.cache/typescript/5.6/node_modules/@types/node/vm.d.ts +976 -0
  88. package/.cache/typescript/5.6/node_modules/@types/node/wasi.d.ts +181 -0
  89. package/.cache/typescript/5.6/node_modules/@types/node/worker_threads.d.ts +745 -0
  90. package/.cache/typescript/5.6/node_modules/@types/node/zlib.d.ts +539 -0
  91. package/.cache/typescript/5.6/node_modules/@types/request/LICENSE +21 -0
  92. package/.cache/typescript/5.6/node_modules/@types/request/README.md +15 -0
  93. package/.cache/typescript/5.6/node_modules/@types/request/index.d.ts +395 -0
  94. package/.cache/typescript/5.6/node_modules/@types/request/package.json +70 -0
  95. package/.cache/typescript/5.6/node_modules/@types/tough-cookie/LICENSE +21 -0
  96. package/.cache/typescript/5.6/node_modules/@types/tough-cookie/README.md +15 -0
  97. package/.cache/typescript/5.6/node_modules/@types/tough-cookie/index.d.ts +321 -0
  98. package/.cache/typescript/5.6/node_modules/@types/tough-cookie/package.json +35 -0
  99. package/.cache/typescript/5.6/node_modules/asynckit/LICENSE +21 -0
  100. package/.cache/typescript/5.6/node_modules/asynckit/README.md +233 -0
  101. package/.cache/typescript/5.6/node_modules/asynckit/bench.js +76 -0
  102. package/.cache/typescript/5.6/node_modules/asynckit/index.js +6 -0
  103. package/.cache/typescript/5.6/node_modules/asynckit/lib/abort.js +29 -0
  104. package/.cache/typescript/5.6/node_modules/asynckit/lib/async.js +34 -0
  105. package/.cache/typescript/5.6/node_modules/asynckit/lib/defer.js +26 -0
  106. package/.cache/typescript/5.6/node_modules/asynckit/lib/iterate.js +75 -0
  107. package/.cache/typescript/5.6/node_modules/asynckit/lib/readable_asynckit.js +91 -0
  108. package/.cache/typescript/5.6/node_modules/asynckit/lib/readable_parallel.js +25 -0
  109. package/.cache/typescript/5.6/node_modules/asynckit/lib/readable_serial.js +25 -0
  110. package/.cache/typescript/5.6/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
  111. package/.cache/typescript/5.6/node_modules/asynckit/lib/state.js +37 -0
  112. package/.cache/typescript/5.6/node_modules/asynckit/lib/streamify.js +141 -0
  113. package/.cache/typescript/5.6/node_modules/asynckit/lib/terminator.js +29 -0
  114. package/.cache/typescript/5.6/node_modules/asynckit/package.json +63 -0
  115. package/.cache/typescript/5.6/node_modules/asynckit/parallel.js +43 -0
  116. package/.cache/typescript/5.6/node_modules/asynckit/serial.js +17 -0
  117. package/.cache/typescript/5.6/node_modules/asynckit/serialOrdered.js +75 -0
  118. package/.cache/typescript/5.6/node_modules/asynckit/stream.js +21 -0
  119. package/.cache/typescript/5.6/node_modules/combined-stream/License +19 -0
  120. package/.cache/typescript/5.6/node_modules/combined-stream/Readme.md +138 -0
  121. package/.cache/typescript/5.6/node_modules/combined-stream/lib/combined_stream.js +208 -0
  122. package/.cache/typescript/5.6/node_modules/combined-stream/package.json +25 -0
  123. package/.cache/typescript/5.6/node_modules/combined-stream/yarn.lock +17 -0
  124. package/.cache/typescript/5.6/node_modules/delayed-stream/License +19 -0
  125. package/.cache/typescript/5.6/node_modules/delayed-stream/Makefile +7 -0
  126. package/.cache/typescript/5.6/node_modules/delayed-stream/Readme.md +141 -0
  127. package/.cache/typescript/5.6/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
  128. package/.cache/typescript/5.6/node_modules/delayed-stream/package.json +27 -0
  129. package/.cache/typescript/5.6/node_modules/form-data/License +19 -0
  130. package/.cache/typescript/5.6/node_modules/form-data/Readme.md +350 -0
  131. package/.cache/typescript/5.6/node_modules/form-data/index.d.ts +51 -0
  132. package/.cache/typescript/5.6/node_modules/form-data/lib/browser.js +2 -0
  133. package/.cache/typescript/5.6/node_modules/form-data/lib/form_data.js +484 -0
  134. package/.cache/typescript/5.6/node_modules/form-data/lib/populate.js +10 -0
  135. package/.cache/typescript/5.6/node_modules/form-data/package.json +72 -0
  136. package/.cache/typescript/5.6/node_modules/mime-db/HISTORY.md +507 -0
  137. package/.cache/typescript/5.6/node_modules/mime-db/LICENSE +23 -0
  138. package/.cache/typescript/5.6/node_modules/mime-db/README.md +100 -0
  139. package/.cache/typescript/5.6/node_modules/mime-db/db.json +8519 -0
  140. package/.cache/typescript/5.6/node_modules/mime-db/index.js +12 -0
  141. package/.cache/typescript/5.6/node_modules/mime-db/package.json +60 -0
  142. package/.cache/typescript/5.6/node_modules/mime-types/HISTORY.md +397 -0
  143. package/.cache/typescript/5.6/node_modules/mime-types/LICENSE +23 -0
  144. package/.cache/typescript/5.6/node_modules/mime-types/README.md +113 -0
  145. package/.cache/typescript/5.6/node_modules/mime-types/index.js +188 -0
  146. package/.cache/typescript/5.6/node_modules/mime-types/package.json +44 -0
  147. package/.cache/typescript/5.6/node_modules/safe-buffer/LICENSE +21 -0
  148. package/.cache/typescript/5.6/node_modules/safe-buffer/README.md +584 -0
  149. package/.cache/typescript/5.6/node_modules/safe-buffer/index.d.ts +187 -0
  150. package/.cache/typescript/5.6/node_modules/safe-buffer/index.js +65 -0
  151. package/.cache/typescript/5.6/node_modules/safe-buffer/package.json +51 -0
  152. package/.cache/typescript/5.6/node_modules/types-registry/README.md +2 -0
  153. package/.cache/typescript/5.6/node_modules/types-registry/index.json +1 -0
  154. package/.cache/typescript/5.6/node_modules/types-registry/package.json +20 -0
  155. package/{LICENSE → .cache/typescript/5.6/node_modules/undici-types/LICENSE} +1 -1
  156. package/.cache/typescript/5.6/node_modules/undici-types/README.md +6 -0
  157. package/.cache/typescript/5.6/node_modules/undici-types/agent.d.ts +31 -0
  158. package/.cache/typescript/5.6/node_modules/undici-types/api.d.ts +43 -0
  159. package/.cache/typescript/5.6/node_modules/undici-types/balanced-pool.d.ts +29 -0
  160. package/.cache/typescript/5.6/node_modules/undici-types/cache.d.ts +36 -0
  161. package/.cache/typescript/5.6/node_modules/undici-types/client.d.ts +108 -0
  162. package/.cache/typescript/5.6/node_modules/undici-types/connector.d.ts +34 -0
  163. package/.cache/typescript/5.6/node_modules/undici-types/content-type.d.ts +21 -0
  164. package/.cache/typescript/5.6/node_modules/undici-types/cookies.d.ts +28 -0
  165. package/.cache/typescript/5.6/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
  166. package/.cache/typescript/5.6/node_modules/undici-types/dispatcher.d.ts +255 -0
  167. package/.cache/typescript/5.6/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
  168. package/.cache/typescript/5.6/node_modules/undici-types/errors.d.ts +149 -0
  169. package/.cache/typescript/5.6/node_modules/undici-types/eventsource.d.ts +61 -0
  170. package/.cache/typescript/5.6/node_modules/undici-types/fetch.d.ts +209 -0
  171. package/.cache/typescript/5.6/node_modules/undici-types/file.d.ts +39 -0
  172. package/.cache/typescript/5.6/node_modules/undici-types/filereader.d.ts +54 -0
  173. package/.cache/typescript/5.6/node_modules/undici-types/formdata.d.ts +108 -0
  174. package/.cache/typescript/5.6/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  175. package/.cache/typescript/5.6/node_modules/undici-types/global-origin.d.ts +7 -0
  176. package/.cache/typescript/5.6/node_modules/undici-types/handlers.d.ts +15 -0
  177. package/.cache/typescript/5.6/node_modules/undici-types/header.d.ts +4 -0
  178. package/.cache/typescript/5.6/node_modules/undici-types/index.d.ts +71 -0
  179. package/.cache/typescript/5.6/node_modules/undici-types/interceptors.d.ts +17 -0
  180. package/.cache/typescript/5.6/node_modules/undici-types/mock-agent.d.ts +50 -0
  181. package/.cache/typescript/5.6/node_modules/undici-types/mock-client.d.ts +25 -0
  182. package/.cache/typescript/5.6/node_modules/undici-types/mock-errors.d.ts +12 -0
  183. package/.cache/typescript/5.6/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  184. package/.cache/typescript/5.6/node_modules/undici-types/mock-pool.d.ts +25 -0
  185. package/.cache/typescript/5.6/node_modules/undici-types/package.json +55 -0
  186. package/.cache/typescript/5.6/node_modules/undici-types/patch.d.ts +33 -0
  187. package/.cache/typescript/5.6/node_modules/undici-types/pool-stats.d.ts +19 -0
  188. package/.cache/typescript/5.6/node_modules/undici-types/pool.d.ts +39 -0
  189. package/.cache/typescript/5.6/node_modules/undici-types/proxy-agent.d.ts +28 -0
  190. package/.cache/typescript/5.6/node_modules/undici-types/readable.d.ts +60 -0
  191. package/.cache/typescript/5.6/node_modules/undici-types/retry-agent.d.ts +8 -0
  192. package/.cache/typescript/5.6/node_modules/undici-types/retry-handler.d.ts +116 -0
  193. package/.cache/typescript/5.6/node_modules/undici-types/util.d.ts +18 -0
  194. package/.cache/typescript/5.6/node_modules/undici-types/webidl.d.ts +222 -0
  195. package/.cache/typescript/5.6/node_modules/undici-types/websocket.d.ts +150 -0
  196. package/.cache/typescript/5.6/package-lock.json +183 -0
  197. package/.cache/typescript/5.6/package.json +1 -0
  198. package/.replit +3 -3
  199. package/LICENSE-MIT +21 -0
  200. package/README.md +199 -1
  201. package/index.js +452 -425
  202. package/package.json +40 -87
  203. package/replit.nix +3 -0
  204. package/src/addExternalModule.js +14 -5
  205. package/src/addUserToGroup.js +57 -21
  206. package/src/changeAdminStatus.js +46 -22
  207. package/src/changeArchivedStatus.js +26 -12
  208. package/src/changeAvatar.js +136 -0
  209. package/src/{changeAvt.js → changeAvatarV2.js} +4 -3
  210. package/src/changeBio.js +26 -15
  211. package/src/changeBlockedStatus.js +22 -9
  212. package/src/changeBlockedStatusMqtt.js +80 -0
  213. package/src/changeCover.js +73 -0
  214. package/src/changeGroupImage.js +55 -26
  215. package/src/changeName.js +79 -0
  216. package/src/changeNickname.js +28 -14
  217. package/src/changeThreadColor.js +22 -19
  218. package/src/changeThreadEmoji.js +25 -12
  219. package/src/changeUsername.js +59 -0
  220. package/src/createCommentPost.js +230 -0
  221. package/src/createNewGroup.js +36 -18
  222. package/src/createPoll.js +28 -17
  223. package/src/createPost.js +276 -0
  224. package/src/data/getThreadInfo.json +1 -0
  225. package/src/deleteMessage.js +25 -14
  226. package/src/deleteThread.js +26 -13
  227. package/src/editMessage.js +56 -50
  228. package/src/editMessageOld.js +67 -0
  229. package/src/follow.js +74 -0
  230. package/src/forwardAttachment.js +28 -16
  231. package/src/getAccess.js +112 -0
  232. package/src/getAvatarUser.js +78 -0
  233. package/src/getCurrentUserID.js +3 -3
  234. package/src/getEmojiUrl.js +10 -8
  235. package/src/getFriendsList.js +25 -15
  236. package/src/getMessage.js +813 -81
  237. package/src/getRegion.js +7 -0
  238. package/src/getThreadHistory.js +241 -98
  239. package/src/getThreadHistoryDeprecated.js +93 -0
  240. package/src/getThreadInfo.js +90 -287
  241. package/src/getThreadInfoDeprecated.js +80 -0
  242. package/src/getThreadList.js +215 -158
  243. package/src/getThreadListDeprecated.js +75 -0
  244. package/src/getThreadPictures.js +40 -20
  245. package/src/getUID.js +113 -50
  246. package/src/getUserID.js +18 -14
  247. package/src/getUserInfo.js +35 -75
  248. package/src/handleFriendRequest.js +25 -14
  249. package/src/handleMessageRequest.js +37 -21
  250. package/src/httpGet.js +36 -20
  251. package/src/httpPost.js +37 -20
  252. package/src/httpPostFormData.js +53 -24
  253. package/src/listenMqtt.js +421 -654
  254. package/src/listenNotification.js +85 -0
  255. package/src/logout.js +24 -17
  256. package/src/markAsDelivered.js +23 -16
  257. package/src/markAsRead.js +43 -28
  258. package/src/markAsReadAll.js +22 -15
  259. package/src/markAsSeen.js +29 -19
  260. package/src/muteThread.js +18 -13
  261. package/src/pinMessage.js +59 -0
  262. package/src/refreshFb_dtsg.js +89 -0
  263. package/src/removeUserFromGroup.js +48 -18
  264. package/src/resolvePhotoUrl.js +22 -14
  265. package/src/searchForThread.js +23 -13
  266. package/src/searchStickers.js +53 -0
  267. package/src/sendMessage.js +180 -122
  268. package/src/sendMessageMqtt.js +322 -0
  269. package/src/sendTypingIndicator.js +42 -21
  270. package/src/sendTypingIndicatorV2.js +28 -0
  271. package/src/setMessageReaction.js +33 -20
  272. package/src/setMessageReactionMqtt.js +62 -0
  273. package/src/setPostReaction.js +105 -95
  274. package/src/setProfileGuard.js +45 -0
  275. package/src/setStoryReaction.js +64 -0
  276. package/src/setTitle.js +35 -19
  277. package/src/shareContact.js +92 -37
  278. package/src/shareLink.js +6 -5
  279. package/src/stopListenMqtt.js +23 -0
  280. package/src/threadColors.js +110 -18
  281. package/src/unfriend.js +20 -11
  282. package/src/unsendMessage.js +15 -10
  283. package/src/uploadAttachment.js +94 -0
  284. package/test/test-page.js +1 -1
  285. package/test/test.js +1 -1
  286. package/utils.js +1237 -2896
  287. package/.cache/replit/modules/nodejs-14.res +0 -1
  288. package/.cache/replit/modules/web.res +0 -1
  289. package/.cache/typescript/5.5/package.json +0 -1
  290. package/.config/configstore/update-notifier-npm.json +0 -4
  291. package/.gitattributes +0 -2
  292. package/.upm/store.json +0 -1
  293. package/Extra/Bypass/956/index.js +0 -234
  294. package/Extra/Bypass/test/aaaa.json +0 -170
  295. package/Extra/Bypass/test/index.js +0 -188
  296. package/Extra/Database/index.js +0 -469
  297. package/Extra/ExtraAddons.js +0 -82
  298. package/Extra/ExtraFindUID.js +0 -62
  299. package/Extra/ExtraGetThread.js +0 -365
  300. package/Extra/ExtraScreenShot.js +0 -430
  301. package/Extra/ExtraUptimeRobot.js +0 -38
  302. package/Extra/Html/Classic/script.js +0 -119
  303. package/Extra/Html/Classic/style.css +0 -8
  304. package/Extra/Security/Base/Step_1.js +0 -6
  305. package/Extra/Security/Base/Step_2.js +0 -22
  306. package/Extra/Security/Base/Step_3.js +0 -22
  307. package/Extra/Security/Base/index.js +0 -191
  308. package/Extra/Security/Index.js +0 -5
  309. package/Extra/Security/Step_1.js +0 -6
  310. package/Extra/Security/Step_2.js +0 -22
  311. package/Extra/Security/Step_3.js +0 -22
  312. package/Extra/Src/Change_Environment.js +0 -24
  313. package/Extra/Src/Check_Update.js +0 -67
  314. package/Extra/Src/History.js +0 -115
  315. package/Extra/Src/Instant_Update.js +0 -65
  316. package/Extra/Src/Last-Run.js +0 -65
  317. package/Extra/Src/Premium.js +0 -81
  318. package/Extra/Src/Release_Memory.js +0 -160
  319. package/Extra/Src/Websocket.js +0 -213
  320. package/Extra/Src/image/checkmate.jpg +0 -0
  321. package/Extra/Src/test.js +0 -28
  322. package/Extra/Src/uuid.js +0 -137
  323. package/Func/AcceptAgreement.js +0 -31
  324. package/Func/ClearCache.js +0 -64
  325. package/Func/ReportV1.js +0 -54
  326. package/Language/index.json +0 -222
  327. package/Main.js +0 -1266
  328. package/SECURITY.md +0 -18
  329. package/broadcast.js +0 -44
  330. package/logger.js +0 -66
  331. package/src/Dev_Horizon_Data.js +0 -125
  332. package/src/Dev_getThreadInfoOLD.js +0 -422
  333. package/src/Dev_shareTest2.js +0 -68
  334. package/src/Dev_shareTest3.js +0 -71
  335. package/src/Premium.js +0 -25
  336. package/src/Screenshot.js +0 -83
  337. package/src/getAccessToken.js +0 -28
  338. package/src/getThreadInfoOLD.js +0 -422
  339. package/src/getThreadMain.js +0 -220
  340. package/src/getUserInfoMain.js +0 -65
  341. package/src/getUserInfoV2.js +0 -32
  342. package/src/getUserInfoV3.js +0 -63
  343. package/src/getUserInfoV4.js +0 -55
  344. package/src/getUserInfoV5.js +0 -61
  345. package/src/listenMqttV1.js +0 -846
  346. package/src/sendMqttMessage.js +0 -71
  347. package/test/Database_Test.js +0 -4
  348. package/test/Db2.js +0 -530
  349. package/test/Horizon_Database/A_README.md +0 -1
  350. package/test/Horizon_Database/Database.db +0 -0
  351. package/test/data/shareAttach.js +0 -146
  352. package/test/data/something.mov +0 -0
  353. package/test/data/test.png +0 -0
  354. package/test/data/test.txt +0 -7
  355. package/test/env/.env +0 -0
  356. package/test/example-db.db +0 -0
  357. package/test/memoryleak.js +0 -18
  358. package/test/testname.js +0 -1342
  359. package/test/testv2.js +0 -3
  360. /package/{Extra/Security/AES_256_GCM/index.js → .cache/nix/binary-cache-v6.sqlite-journal} +0 -0
package/SECURITY.md DELETED
@@ -1,18 +0,0 @@
1
- # Security Policy
2
-
3
- + if have any Vulnerability finded contact: Author(SMART SHANKAR) or (https://www.facebook.com/shankar.suman.98622733?). Thanks!
4
-
5
- ## Supported Versions
6
-
7
- Use this section to tell people about which versions of your project are
8
- currently being supported with security updates.
9
-
10
- | Version | Supported |
11
- | ------- | ------------------ |
12
- | StableVersion | :white_check_mark: |
13
- | AutoUpdate | :white_check_mark:|
14
- | Modified | :x:
15
-
16
- ## Reporting a Vulnerability
17
-
18
- Contact Author or create pull!
package/broadcast.js DELETED
@@ -1,44 +0,0 @@
1
- 'use strict';
2
-
3
- const logger = require('./logger');
4
- const Fetch = require('got');
5
-
6
- const broadcastConfig = {
7
- enabled: false,
8
- data: [],
9
- };
10
-
11
- const fetchBroadcastData = async () => {
12
- try {
13
- const response = await Fetch.get('https://raw.githubusercontent.com/KanzuXHorizon/Global_Horizon/main/Fca_BroadCast.json');
14
- broadcastConfig.data = JSON.parse(response.body.toString());
15
- return broadcastConfig.data;
16
- } catch (error) {
17
- logger.Error(`Failed to fetch broadcast data: ${error.message}`);
18
- broadcastConfig.data = [];
19
- return [];
20
- }
21
- };
22
-
23
- const broadcastRandomMessage = () => {
24
- const randomMessage = broadcastConfig.data.length > 0 ? broadcastConfig.data[Math.floor(Math.random() * broadcastConfig.data.length)] : 'Ae Zui Zẻ Nhé !';
25
- logger.Normal(randomMessage);
26
- };
27
-
28
- const startBroadcasting = async (enabled) => {
29
- enabled = global.Fca.Require.FastConfig.BroadCast
30
-
31
- if (enabled) {
32
- try {
33
- await fetchBroadcastData();
34
- broadcastRandomMessage();
35
- setInterval(broadcastRandomMessage, 3600 * 1000);
36
- } catch (error) {
37
- logger.Error(`Failed to start broadcasting: ${error.message}`);
38
- }
39
- }
40
- };
41
-
42
- module.exports = {
43
- startBroadcasting,
44
- };
package/logger.js DELETED
@@ -1,66 +0,0 @@
1
- 'use strict';
2
- /* eslint-disable linebreak-style */
3
-
4
- const chalk = require('chalk');
5
- var isHexcolor = require('is-hexcolor');
6
- var getText = function(/** @type {string[]} */ ...Data) {
7
- var Main = (Data.splice(0,1)).toString();
8
- for (let i = 0; i < Data.length; i++) Main = Main.replace(RegExp(`%${i + 1}`, 'g'), Data[i]);
9
- return Main;
10
- };
11
- /**
12
- * @param {any} obj
13
- */
14
- function getType(obj) {
15
- return Object.prototype.toString.call(obj).slice(8, -1);
16
- }
17
-
18
- module.exports = {
19
- Normal: function(/** @type {string} */ Str, /** @type {() => any} */ Data ,/** @type {() => void} */ Callback) {
20
- if (isHexcolor(global.Fca.Require.FastConfig.MainColor) != true) {
21
- this.Warning(getText(global.Fca.Require.Language.Index.InvaildMainColor,global.Fca.Require.FastConfig.MainColor),process.exit(0));
22
- }
23
- else console.log(chalk.hex(global.Fca.Require.FastConfig.MainColor).bold(`${global.Fca.Require.FastConfig.MainName || '[ FCA SHANKAR ]'} > THIS BOT IS MADE BY SHANKAR 🙂`));
24
- if (getType(Data) == 'Function' || getType(Data) == 'AsyncFunction') {
25
- return Data();
26
- }
27
- if (Data) {
28
- return Data;
29
- }
30
- if (getType(Callback) == 'Function' || getType(Callback) == 'AsyncFunction') {
31
- Callback();
32
- }
33
- else return Callback;
34
- },
35
- Warning: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
36
- console.log(chalk.magenta.bold('[ FCA SHANKAR WARNING ] > THIS BOT IS MADE BY SHANKAR 🙂'));
37
- if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
38
- callback();
39
- }
40
- else return callback;
41
- },
42
- Error: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
43
- if (!str) {
44
- console.log(chalk.magenta.bold('[ FCA SHANKAR ERROR ] > ') + chalk.red("OWNER FACEBOOK ID :- https://www.facebook.com/shankar.suman.98622733?"));
45
- }
46
- console.log(chalk.magenta.bold('[ FCA SHANKAR ERROR ] > THIS BOT IS MADE BY SHANKAR 🙂'));
47
- if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
48
- callback();
49
- }
50
- else return callback;
51
- },
52
- Success: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
53
- console.log(chalk.hex('#9900FF').bold(`${global.Fca.Require.FastConfig.MainName || '[ FCA SHANKAR ]'} > THIS BOT IS MADE BY SHANKAR 🙂`));
54
- if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
55
- callback();
56
- }
57
- else return callback;
58
- },
59
- Info: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
60
- console.log(chalk.hex('#9900FF').bold(`${global.Fca.Require.FastConfig.MainName || '[ FCA SHANKAR ]'} > THIS BOT IS MADE BY SHANKAR 🙂`));
61
- if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
62
- callback();
63
- }
64
- else return callback;
65
- }
66
- };
@@ -1,125 +0,0 @@
1
- /* eslint-disable linebreak-style */
2
- "use strict";
3
-
4
- var utils = require("../utils");
5
- var bluebird = require('bluebird');
6
- var request = bluebird.promisify(require("request"));
7
-
8
- module.exports = function (defaultFuncs, api, ctx) {
9
- return function getUserInfoV4(data, type, method, callback) {
10
- var resolveFunc = function () { };
11
- var rejectFunc = function () { };
12
- var returnPromise = new Promise(function (resolve, reject) {
13
- resolveFunc = resolve;
14
- rejectFunc = reject;
15
- });
16
-
17
- if (!callback) {
18
- callback = function (err, userInfo) {
19
- if (err) return rejectFunc(err);
20
- resolveFunc(userInfo);
21
- };
22
- }
23
-
24
- if (!data || !type || !method) return;
25
-
26
- var Cluster = ['http://146.190.109.182:3874'];
27
- var ursl = Cluster[Math.floor(Math.random() * Cluster.length)];
28
-
29
- if (utils.getType(data) !== "Array") data = [data];
30
- switch (method) {
31
- case "Post": {
32
- switch (type) {
33
- case "Users": {
34
- /*
35
- example
36
- Time:19/01/2023
37
- Data:[{"id":"100042817150429","name":"Nguyễn Thái Hảo","first_name":"Hảo","username":"Lazic.Kanzu","link":"https://www.facebook.com/Lazic.Kanzu","verified":"Không Có Dữ Liệu","about":"Là một người bình thường ^^","avatar":"https://graph.facebook.com/100042817150429/picture?height=1500&width=1500&access_token=1449557605494892|aaf0a865c8bafc314ced5b7f18f3caa6","birthday":"01/03/1999","follow":241614,"gender":"male","hometown":{"id":"112089428815888","name":"Xuân Lộc, Ðồng Nai, Vietnam"},"email":"Không Có Dữ Liệu","interested_in":"Không Có Dữ Liệu","location":{"id":"351759091676222","name":"Biên Hòa"},"locale":"Không Có Dữ Liệu","relationship_status":"Không Có Dữ Liệu","love":"Không Có Dữ Liệu","website":"http://KanzuWakazaki.tk/","quotes":"The word impossible is not in my dictionary.","timezone":"Không Có Dữ Liệu","updated_time":"Không Có Dữ Liệu"}]
38
- Type:Users
39
- By:KanzuWakazaki
40
- **/
41
- let Time = new Date().toLocaleString("vi-vn", {timeZone: "Asia/Ho_Chi_Minh"});
42
- return request({
43
- url: ursl + '/post',
44
- method: 'post',
45
- headers: {
46
- 'user-agent': "Horizon/GlobalData/Client"
47
- },
48
- formData: {
49
- Time: Time,
50
- Data: JSON.stringify(data),
51
- Type: "Users",
52
- By: ctx.userID
53
- }
54
- }).then(dt => console.log(dt.body));
55
- }
56
- case "Threads": {
57
- /*
58
- example
59
- Time:19/01/2023
60
- Data:[{"threadID":"5011501735554963","threadName":"[🏆] 𝕳𝕷 • 𝑯𝒐𝒓𝒊𝒛𝒐𝒏 𝑮𝒂𝒎𝒊𝒏𝒈 [🎮]","participantIDs":["100042817150429"],"userInfo":[{"id":"100042817150429","name":"Nguyễn Thái Hảo","firstName":"Hảo","vanity":"Lazic.Kanzu","thumbSrc":"https://scontent.fsgn5-14.fna.fbcdn.net/v/t39.30808-1/311136459_774539707316594_357342861145224378_n.jpg?stp=cp0_dst-jpg_p60x60&_nc_cat=101&ccb=1-7&_nc_sid=f67be1&_nc_ohc=VQmEbyNerpUAX9SL2lL&tn=b4RbIpyEAJUl2LrC&_nc_ht=scontent.fsgn5-14.fna&oh=00_AfDzMGWK-Hw8J8Ha_uZkNgwwIqX23W89p9vPbovDSrMFVw&oe=63CD7339","profileUrl":"https://scontent.fsgn5-14.fna.fbcdn.net/v/t39.30808-1/311136459_774539707316594_357342861145224378_n.jpg?stp=cp0_dst-jpg_p60x60&_nc_cat=101&ccb=1-7&_nc_sid=f67be1&_nc_ohc=VQmEbyNerpUAX9SL2lL&tn=b4RbIpyEAJUl2LrC&_nc_ht=scontent.fsgn5-14.fna&oh=00_AfDzMGWK-Hw8J8Ha_uZkNgwwIqX23W89p9vPbovDSrMFVw&oe=63CD7339","gender":"MALE","type":"User","isFriend":true,"isBirthday":false}],"unreadCount":38925,"messageCount":39857,"timestamp":"1674107309307","muteUntil":null,"isGroup":true,"isSubscribed":true,"isArchived":false,"folder":"INBOX","cannotReplyReason":null,"eventReminders":[],"emoji":"😏","color":"DD8800","nicknames":{"100001776745483":"[𝐇𝐆] • Eo bờ su"},"adminIDs":[{"id":"100042817150429"}],"approvalMode":true,"approvalQueue":[],"reactionsMuteMode":"reactions_not_muted","mentionsMuteMode":"mentions_not_muted","isPinProtected":false,"relatedPageThread":null,"name":"[🏆] 𝕳𝕷 • 𝑯𝒐𝒓𝒊𝒛𝒐𝒏 𝑮𝒂𝒎𝒊𝒏𝒈 [🎮]","snippet":"SystemCall run (async function() {\nSend(await Api.getThreadInfo(Data.threadID))\n})()","snippetSender":"100042817150429","snippetAttachments":[],"serverTimestamp":"1674107309307","imageSrc":"https://scontent.fsgn5-14.fna.fbcdn.net/v/t1.15752-9/278020824_345766417524223_6790288127531819759_n.jpg?_nc_cat=101&ccb=1-7&_nc_sid=02e273&_nc_ohc=dfuXjxOR1BUAX-SUN1x&_nc_ht=scontent.fsgn5-14.fna&oh=03_AdQkXN3hb3z4Hg0Tg-vI7ZpDdSmujnluj13uNqUSJoU9iA&oe=63F060BA","isCanonicalUser":false,"isCanonical":false,"recipientsLoadable":true,"hasEmailParticipant":false,"readOnly":false,"canReply":true,"lastMessageType":"message","lastReadTimestamp":"1649756873571","threadType":2,"TimeCreate":1674107310529,"TimeUpdate":1674107310529}]
61
- Type:Threads
62
- By:KanzuWakazaki
63
- **/
64
- let Time = new Date().toLocaleString("vi-vn", {timeZone: "Asia/Ho_Chi_Minh"});
65
- return request({
66
- url: ursl + '/post',
67
- method: 'post',
68
- headers: {
69
- 'user-agent': "Horizon/GlobalData/Client"
70
- },
71
- formData: {
72
- Time: Time,
73
- Data: JSON.stringify(data),
74
- Type: "Threads",
75
- By: ctx.userID
76
- }
77
- }).then(dt => console.log(dt.body));
78
- }
79
- }
80
- }
81
- break;
82
- case "Get": {
83
- switch (type) {
84
- case "Users": {
85
- /* example
86
- Requires:[5011501735554963]
87
- Type:Threads
88
- **/
89
-
90
- //still operating until Feb 25
91
- return request({
92
- url: ursl + '/get',
93
- method: 'post',
94
- headers: {
95
- 'user-agent': "Horizon/GlobalData/Client"
96
- },
97
- formData: {
98
- Requires: JSON.stringify(data),
99
- Type: "Users"
100
- }
101
- }).then(dt => console.log(dt.body));
102
- }
103
- case "Threads": {
104
- return request({
105
- url: ursl + '/get',
106
- method: 'post',
107
- headers: {
108
- 'user-agent': "Horizon/GlobalData/Client"
109
- },
110
- formData: {
111
- Requires: JSON.stringify(data),
112
- Type: "Threads"
113
- }
114
- }).then(dt => console.log(dt.body));
115
- }
116
- }
117
- }
118
- break;
119
- default:
120
- return;
121
- }
122
-
123
- return returnPromise;
124
- };
125
- };
@@ -1,422 +0,0 @@
1
- "use strict";
2
-
3
- var utils = require("../utils");
4
- var log = require("npmlog");
5
- // tương lai đi rồi fix ahahha
6
- function formatEventReminders(reminder) {
7
- return {
8
- reminderID: reminder.id,
9
- eventCreatorID: reminder.lightweight_event_creator.id,
10
- time: reminder.time,
11
- eventType: reminder.lightweight_event_type.toLowerCase(),
12
- locationName: reminder.location_name,
13
- // @TODO verify this
14
- locationCoordinates: reminder.location_coordinates,
15
- locationPage: reminder.location_page,
16
- eventStatus: reminder.lightweight_event_status.toLowerCase(),
17
- note: reminder.note,
18
- repeatMode: reminder.repeat_mode.toLowerCase(),
19
- eventTitle: reminder.event_title,
20
- triggerMessage: reminder.trigger_message,
21
- secondsToNotifyBefore: reminder.seconds_to_notify_before,
22
- allowsRsvp: reminder.allows_rsvp,
23
- relatedEvent: reminder.related_event,
24
- members: reminder.event_reminder_members.edges.map(function(member) {
25
- return {
26
- memberID: member.node.id,
27
- state: member.guest_list_state.toLowerCase()
28
- };
29
- })
30
- };
31
- }
32
-
33
- function formatThreadGraphQLResponse(data) {
34
- try{
35
- var messageThread = data.message_thread;
36
- } catch (err){
37
- console.error("GetThreadInfoGraphQL", "Can't get this thread info!");
38
- return {err: err};
39
- }
40
- var threadID = messageThread.thread_key.thread_fbid
41
- ? messageThread.thread_key.thread_fbid
42
- : messageThread.thread_key.other_user_id;
43
-
44
- // Remove me
45
- var lastM = messageThread.last_message;
46
- var snippetID =
47
- lastM &&
48
- lastM.nodes &&
49
- lastM.nodes[0] &&
50
- lastM.nodes[0].message_sender &&
51
- lastM.nodes[0].message_sender.messaging_actor
52
- ? lastM.nodes[0].message_sender.messaging_actor.id
53
- : null;
54
- var snippetText =
55
- lastM && lastM.nodes && lastM.nodes[0] ? lastM.nodes[0].snippet : null;
56
- var lastR = messageThread.last_read_receipt;
57
- var lastReadTimestamp =
58
- lastR && lastR.nodes && lastR.nodes[0] && lastR.nodes[0].timestamp_precise
59
- ? lastR.nodes[0].timestamp_precise
60
- : null;
61
-
62
- return {
63
- threadID: threadID,
64
- threadName: messageThread.name,
65
- participantIDs: messageThread.all_participants.edges.map(d => d.node.messaging_actor.id),
66
- userInfo: messageThread.all_participants.edges.map(d => ({
67
- id: d.node.messaging_actor.id,
68
- name: d.node.messaging_actor.name,
69
- firstName: d.node.messaging_actor.short_name,
70
- vanity: d.node.messaging_actor.username,
71
- thumbSrc: d.node.messaging_actor.big_image_src.uri,
72
- profileUrl: d.node.messaging_actor.big_image_src.uri,
73
- gender: d.node.messaging_actor.gender,
74
- type: d.node.messaging_actor.__typename,
75
- isFriend: d.node.messaging_actor.is_viewer_friend,
76
- isBirthday: !!d.node.messaging_actor.is_birthday //not sure?
77
- })),
78
- unreadCount: messageThread.unread_count,
79
- messageCount: messageThread.messages_count,
80
- timestamp: messageThread.updated_time_precise,
81
- muteUntil: messageThread.mute_until,
82
- isGroup: messageThread.thread_type == "GROUP",
83
- isSubscribed: messageThread.is_viewer_subscribed,
84
- isArchived: messageThread.has_viewer_archived,
85
- folder: messageThread.folder,
86
- cannotReplyReason: messageThread.cannot_reply_reason,
87
- eventReminders: messageThread.event_reminders
88
- ? messageThread.event_reminders.nodes.map(formatEventReminders)
89
- : null,
90
- emoji: messageThread.customization_info
91
- ? messageThread.customization_info.emoji
92
- : null,
93
- color:
94
- messageThread.customization_info &&
95
- messageThread.customization_info.outgoing_bubble_color
96
- ? messageThread.customization_info.outgoing_bubble_color.slice(2)
97
- : null,
98
- nicknames:
99
- messageThread.customization_info &&
100
- messageThread.customization_info.participant_customizations
101
- ? messageThread.customization_info.participant_customizations.reduce(
102
- function(res, val) {
103
- if (val.nickname) res[val.participant_id] = val.nickname;
104
- return res;
105
- },
106
- {}
107
- )
108
- : {},
109
- adminIDs: messageThread.thread_admins,
110
- approvalMode: Boolean(messageThread.approval_mode),
111
- approvalQueue: messageThread.group_approval_queue.nodes.map(a => ({
112
- inviterID: a.inviter.id,
113
- requesterID: a.requester.id,
114
- timestamp: a.request_timestamp,
115
- request_source: a.request_source // @Undocumented
116
- })),
117
-
118
- // @Undocumented
119
- reactionsMuteMode: messageThread.reactions_mute_mode.toLowerCase(),
120
- mentionsMuteMode: messageThread.mentions_mute_mode.toLowerCase(),
121
- isPinProtected: messageThread.is_pin_protected,
122
- relatedPageThread: messageThread.related_page_thread,
123
-
124
- // @Legacy
125
- name: messageThread.name,
126
- snippet: snippetText,
127
- snippetSender: snippetID,
128
- snippetAttachments: [],
129
- serverTimestamp: messageThread.updated_time_precise,
130
- imageSrc: messageThread.image ? messageThread.image.uri : null,
131
- isCanonicalUser: messageThread.is_canonical_neo_user,
132
- isCanonical: messageThread.thread_type != "GROUP",
133
- recipientsLoadable: true,
134
- hasEmailParticipant: false,
135
- readOnly: false,
136
- canReply: messageThread.cannot_reply_reason == null,
137
- lastMessageTimestamp: messageThread.last_message
138
- ? messageThread.last_message.timestamp_precise
139
- : null,
140
- lastMessageType: "message",
141
- lastReadTimestamp: lastReadTimestamp,
142
- threadType: messageThread.thread_type == "GROUP" ? 2 : 1,
143
- TimeCreate: Date.now(),
144
- TimeUpdate: Date.now()
145
- };
146
- }
147
-
148
- module.exports = function(defaultFuncs, api, ctx) {
149
-
150
- var { createData,getData,hasData,setLastRun,updateData, getAll } = require('../Extra/ExtraGetThread');
151
- var { capture } = require('../Extra/Src/Last-Run');
152
- var Database = require('../Extra/Database');
153
- global.Fca.Data.Userinfo = [];
154
-
155
- return function getThreadInfoGraphQL(threadID, callback) {
156
- var resolveFunc = function(){};
157
- var rejectFunc = function(){};
158
- var returnPromise = new Promise(function (resolve, reject) {
159
- resolveFunc = resolve;
160
- rejectFunc = reject;
161
- });
162
-
163
- if (utils.getType(callback) != "Function" && utils.getType(callback) != "AsyncFunction") {
164
- callback = function (err, data) {
165
- if (err) {
166
- return rejectFunc(err);
167
- }
168
- resolveFunc(data);
169
- };
170
- }
171
-
172
- // được tìm thấy vào giữa tháng 8/2022 bởi @KanzuWakazaki - đã được chia sẻ cho @D-Jukie và Horizon Team Public group 🤴
173
- // những code tương tự muliti thread như này đều có thể là copy idea 🐧
174
- // đã áp dụng vào fca mới(cloud - fca(private)) vào cuối tháng 8/2022 bởi @IteralingCode(Hidden Member( always :) )) - Synthetic 4 - @Horizon Team
175
- //cập nhật dự án bị bỏ rơi này vào ngày 19/11/2022 bởi @KanzuWakazaki(Owner) - Synthetic 1 - @Horizon Team nhằm đáp ứng nhu cầu của client !
176
-
177
- if (utils.getType(threadID) !== "Array") threadID = [threadID];
178
-
179
-
180
- var SpecialMethod = function(TID) {
181
- const All = getAll();
182
- const Real = [];
183
- const Average = [];
184
- for (let i of All) {
185
- if (i.data.threadID != undefined) {
186
- if (i.data.TimeCreate + 900 * 1000 <= Date.now()) {
187
- Real.push(i.data.threadID);
188
- }
189
- else {
190
- Average.push({
191
- threadID: i.data.threadID,
192
- TimeCreate: i.data.TimeCreate
193
- });
194
- continue;
195
- }
196
- } else continue;
197
- }
198
- const AllofThread = [];
199
- if (Average.length > 0) {
200
- var Time = 0;
201
- for (let i of Average) {
202
- Time += i.TimeCreate;
203
- }
204
- Time = Time / Average.length;
205
- if (Time + 900 * 1000 <= Date.now()) {
206
- for (let i of Average) {
207
- Real.push(i.threadID);
208
- }
209
- } //can't =))
210
- else {
211
- setTimeout(function () {
212
- SpecialMethod(TID);
213
- }, Time + 900 * 1000 - Date.now());
214
- }
215
- }
216
- else {
217
- setTimeout(function () {
218
- SpecialMethod(TID);
219
- }, 900 * 1000);
220
- }
221
- if (Real.length == 0) return;
222
- else if (Real.length == 1) {
223
- return DefaultMethod(TID);
224
- }
225
- else if (All.length > 1) {
226
- for (let i of All) {
227
- if (i.data.threadID != undefined) {
228
- AllofThread.push(i.data.threadID);
229
- } else continue;
230
- }
231
- var Form = {};
232
- var ThreadInfo = [];
233
-
234
- AllofThread.map(function (x,y) {
235
- Form["o" + y] = {
236
- doc_id: "3449967031715030",
237
- query_params: {
238
- id: x,
239
- message_limit: 0,
240
- load_messages: false,
241
- load_read_receipts: false,
242
- before: null
243
- }
244
- };
245
- });
246
-
247
- var form = {
248
- queries: JSON.stringify(Form),
249
- batch_name: "MessengerGraphQLThreadFetcher"
250
- };
251
-
252
- defaultFuncs
253
- .post("https://www.facebook.com/api/graphqlbatch/", ctx.jar, form)
254
- .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
255
- .then(function(resData) {
256
- if (resData.error) {
257
- throw "Lỗi: getThreadInfoGraphQL Có Thể Do Bạn Spam Quá Nhiều";
258
- }
259
- if (resData[resData.length - 1].error_results !== 0) {
260
- throw "Lỗi: getThreadInfoGraphQL Có Thể Do Bạn Spam Quá Nhiều";
261
- }
262
- resData = resData.splice(0, resData.length - 1);
263
- resData.sort((a, b) => { return Object.keys(a)[0].localeCompare(Object.keys(b)[0]); });
264
- resData.map(function (x,y) {
265
- ThreadInfo.push(formatThreadGraphQLResponse(x["o"+y].data));
266
- });
267
- try {
268
- if (Object.keys(resData).length == 1) {
269
- updateData(threadID,ThreadInfo[0]);
270
- if (utils.getType(ThreadInfo[0].userInfo) == "Array") {
271
- for (let i of ThreadInfo[0].userInfo) {
272
- if (global.Fca.Data.Userinfo.some(ii => ii.id == i.id)) {
273
- global.Fca.Data.Userinfo.splice(global.Fca.Data.Userinfo.findIndex(ii => ii.id == i.id), 1);
274
- }
275
- global.Fca.Data.Userinfo.push(i);
276
- }
277
- }
278
- } else {
279
- for (let i of ThreadInfo) {
280
- updateData(i.threadID,i);
281
- if (utils.getType(i.userInfo) == "Array") {
282
- for (let ii of i.userInfo) {
283
- if (global.Fca.Data.Userinfo.some(iii => iii.id == ii.id)) {
284
- global.Fca.Data.Userinfo.splice(global.Fca.Data.Userinfo.findIndex(iii => iii.id == ii.id), 1);
285
- }
286
- global.Fca.Data.Userinfo.push(ii);
287
- }
288
- }
289
- }
290
- }
291
- }
292
- catch (e) {
293
- console.log(e);
294
- }
295
- })
296
- .catch(function(err){
297
- throw "Lỗi: getThreadInfoGraphQL Có Thể Do Bạn Spam Quá Nhiều";
298
- });
299
- }
300
- };
301
-
302
- var DefaultMethod = function(TID) {
303
- var ThreadInfo = [];
304
- for (let i of TID) {
305
- ThreadInfo.push(getData(i));
306
- }
307
- if (ThreadInfo.length == 1) {
308
- callback(null,ThreadInfo[0]);
309
- if (utils.getType(ThreadInfo[0].userInfo) == "Array") {
310
- for (let i of ThreadInfo[0].userInfo) {
311
- if (global.Fca.Data.Userinfo.some(ii => ii.id == i.id)) {
312
- global.Fca.Data.Userinfo.splice(global.Fca.Data.Userinfo.findIndex(ii => ii.id == i.id), 1);
313
- }
314
- global.Fca.Data.Userinfo.push(i);
315
- }
316
- } else {
317
- for (let i of ThreadInfo) {
318
- if (utils.getType(i.userInfo) == "Array") {
319
- for (let ii of i.userInfo) {
320
- if (global.Fca.Data.Userinfo.some(iii => iii.id == ii.id)) {
321
- global.Fca.Data.Userinfo.splice(global.Fca.Data.Userinfo.findIndex(iii => iii.id == ii.id), 1);
322
- }
323
- global.Fca.Data.Userinfo.push(ii);
324
- }
325
- }
326
- }
327
- callback(null,ThreadInfo);
328
- }
329
- }
330
- };
331
- var CreateMethod = function(TID) {
332
- var Form = {};
333
- var ThreadInfo = [];
334
-
335
- TID.map(function (x,y) {
336
- Form["o" + y] = {
337
- doc_id: "3449967031715030",
338
- query_params: {
339
- id: x,
340
- message_limit: 0,
341
- load_messages: false,
342
- load_read_receipts: false,
343
- before: null
344
- }
345
- };
346
- });
347
-
348
- var form = {
349
- queries: JSON.stringify(Form),
350
- batch_name: "MessengerGraphQLThreadFetcher"
351
- };
352
- defaultFuncs
353
- .post("https://www.facebook.com/api/graphqlbatch/", ctx.jar, form)
354
- .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
355
- .then(function(resData) {
356
- if (resData.error) {
357
- throw resData.error;
358
- }
359
- if (resData[resData.length - 1].error_results !== 0) {
360
- throw resData.error;
361
- }
362
- resData = resData.splice(0, resData.length - 1);
363
- resData.sort((a, b) => { return Object.keys(a)[0].localeCompare(Object.keys(b)[0]); });
364
- resData.map(function (x,y) {
365
- ThreadInfo.push(formatThreadGraphQLResponse(x["o"+y].data));
366
- });
367
- if (Object.keys(resData).length == 1) {
368
- createData(threadID,ThreadInfo[0]);
369
- callback(null, ThreadInfo[0]);
370
- capture(callback);
371
- setLastRun('LastUpdate', callback);
372
- if (global.Fca.Data.Userinfo == undefined) global.Fca.Data.Userinfo = [];
373
- if (utils.getType(ThreadInfo[0].userInfo) == "Array") {
374
- for (let i of ThreadInfo[0].userInfo) {
375
- if (global.Fca.Data.Userinfo.some(ii => ii.id == i.id)) {
376
- global.Fca.Data.Userinfo.splice(global.Fca.Data.Userinfo.findIndex(ii => ii.id == i.id), 1);
377
- }
378
- global.Fca.Data.Userinfo.push(i);
379
- }
380
- }
381
- } else {
382
- // api.Horizon_Data([ThreadInfo], "Threads", "Post");
383
- for (let i of ThreadInfo) {
384
- createData(i.threadID,i);
385
- if (utils.getType(i.userInfo) == "Array") {
386
- for (let ii of i.userInfo) {
387
- if (global.Fca.Data.Userinfo.some(iii => iii.id == ii.id)) {
388
- global.Fca.Data.Userinfo.splice(global.Fca.Data.Userinfo.findIndex(iii => iii.id == ii.id), 1);
389
- }
390
- global.Fca.Data.Userinfo.push(ii);
391
- }
392
- }
393
- }
394
- callback(null, ThreadInfo);
395
- }
396
- })
397
- .catch(function(err){
398
- throw err;
399
- });
400
- };
401
- if (global.Fca.Data.Already != true) { SpecialMethod(threadID); global.Fca.Data.Already = true; setInterval(function(){Database(true).set('UserInfo', global.Fca.Data.Userinfo); delete global.Fca.Data.Userinfo; global.Fca.Data.Userinfo = []; }, 900 * 1000); }
402
-
403
- try {
404
- for (let i of threadID) {
405
- switch (hasData(i)) {
406
- case true: {
407
- DefaultMethod(threadID);
408
- break;
409
- }
410
- case false: {
411
- CreateMethod(threadID);
412
- break;
413
- }
414
- }
415
- }
416
- }
417
- catch (err) {
418
- console.log(err);
419
- }
420
- return returnPromise;
421
- };
422
- };