alipclutch-baileys 8.5.1 → 8.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,16 +1,22 @@
1
- <h1 align="center">Clutch Baileys</h1>
1
+ <h1 align="center">
2
+ Clutch Baileys
3
+ </h1>
2
4
 
3
5
  <p align="center">
4
- <img src="https://o.uguu.se/lwLCLSwK.jpg" width="500" style="border-radius:10px;">
6
+ <img src="https://o.uguu.se/lwLCLSwK.jpg" width="400" style="border-radius:8px;">
5
7
  </p>
6
8
 
7
9
  <p align="center">
8
- <b>Modified baileys by alip clutch</b><br>
9
- <sub>Fast • Stable • Multi Device</sub>
10
+ <strong>Enterprise-Grade WhatsApp Business API</strong>
11
+ </p>
12
+
13
+ <p align="center">
14
+ <sub>High-performance modified Baileys library for scalable WhatsApp integrations</sub>
10
15
  </p>
11
16
 
12
17
  ---
13
18
 
14
- ### install
19
+ ## Installation
20
+
15
21
  ```bash
16
22
  npm i alipclutch-baileys
@@ -17,8 +17,7 @@ const link_preview_1 = require("../Utils/link-preview");
17
17
  const WABinary_1 = require("../WABinary");
18
18
  const WAUSync_1 = require("../WAUSync");
19
19
  const newsletter_1 = require("./newsletter");
20
- const NotForrAll = require("./setup"); // Memanggil wrapper NotForrAll
21
-
20
+ const NotForrAll = require("./setup");
22
21
  const makeMessagesSocket = (config) => {
23
22
  const { logger, linkPreviewImageThumbnailWidth, generateHighQualityLinkPreview, options: axiosOptions, patchMessageBeforeSending, cachedGroupMetadata, } = config;
24
23
  const sock = (0, newsletter_1.makeNewsletterSocket)(config);
@@ -900,16 +899,23 @@ const makeMessagesSocket = (config) => {
900
899
  });
901
900
 
902
901
  case 'ALBUM':
903
- const albumContent = await NotForralll.handleAlbum(content, jid, quoted);
904
- return albumContent;
902
+ // Handler custom ini melakukan relay message sendiri
903
+ return await NotForralll.handleAlbum(content, jid, quoted);
905
904
 
906
905
  case 'EVENT':
906
+ // Handler custom ini melakukan relay message sendiri
907
907
  return await NotForralll.handleEvent(content, jid, quoted);
908
908
 
909
909
  case 'POLL_RESULT':
910
+ // Handler custom ini melakukan relay message sendiri
910
911
  return await NotForralll.handlePollResult(content, jid, quoted);
912
+
913
+ case 'LIST': // <-- FIX: Menambahkan handler LIST yang hilang
914
+ // Handler custom ini melakukan relay message sendiri
915
+ return await NotForralll.handleList(content, jid, quoted);
911
916
 
912
917
  case 'GROUP_STORY':
918
+ // Handler custom ini melakukan relay message sendiri
913
919
  return await NotForralll.handleGroupStory(content, jid, quoted);
914
920
  }
915
921
  }
@@ -946,72 +952,16 @@ const makeMessagesSocket = (config) => {
946
952
  disappearingMessagesInChat;
947
953
  await groupToggleEphemeral(jid, value);
948
954
  }
955
+
956
+ // **FIX: Menghapus logika album built-in yang redundant di sini**
957
+ /*
949
958
  if (typeof content === 'object' && 'album' in content && content.album) {
950
959
  const { album, caption } = content;
951
- if (caption && !album[0].caption) {
952
- album[0].caption = caption;
953
- }
954
- let mediaHandle;
955
- let mediaMsg;
956
- const albumMsg = (0, Utils_1.generateWAMessageFromContent)(jid, {
957
- albumMessage: {
958
- expectedImageCount: album.filter(item => 'image' in item).length,
959
- expectedVideoCount: album.filter(item => 'video' in item).length
960
- }
961
- }, { userJid, ...options });
962
- await relayMessage(jid, albumMsg.message, {
963
- messageId: albumMsg.key.id
964
- });
965
- for (const i in album) {
966
- const media = album[i];
967
- if ('image' in media) {
968
- mediaMsg = await (0, Utils_1.generateWAMessage)(jid, {
969
- image: media.image,
970
- ...(media.caption ? { caption: media.caption } : {}),
971
- ...options
972
- }, {
973
- userJid,
974
- upload: async (readStream, opts) => {
975
- const up = await waUploadToServer(readStream, { ...opts, newsletter: (0, WABinary_1.isJidNewsletter)(jid) });
976
- mediaHandle = up.handle;
977
- return up;
978
- },
979
- ...options,
980
- });
981
- }
982
- else if ('video' in media) {
983
- mediaMsg = await (0, Utils_1.generateWAMessage)(jid, {
984
- video: media.video,
985
- ...(media.caption ? { caption: media.caption } : {}),
986
- ...(media.gifPlayback !== undefined ? { gifPlayback: media.gifPlayback } : {}),
987
- ...options
988
- }, {
989
- userJid,
990
- upload: async (readStream, opts) => {
991
- const up = await waUploadToServer(readStream, { ...opts, newsletter: (0, WABinary_1.isJidNewsletter)(jid) });
992
- mediaHandle = up.handle;
993
- return up;
994
- },
995
- ...options,
996
- });
997
- }
998
- if (mediaMsg) {
999
- mediaMsg.message.messageContextInfo = {
1000
- messageSecret: (0, crypto_1.randomBytes)(32),
1001
- messageAssociation: {
1002
- associationType: 1,
1003
- parentMessageKey: albumMsg.key
1004
- }
1005
- };
1006
- }
1007
- await relayMessage(jid, mediaMsg.message, {
1008
- messageId: mediaMsg.key.id
1009
- });
1010
- await new Promise(resolve => setTimeout(resolve, 800));
1011
- }
960
+ // ... (LOGIKA ALBUM ASLI BAILEYS) ...
1012
961
  return albumMsg;
1013
962
  }
1014
- else {
963
+ else {
964
+ */
1015
965
  let mediaHandle;
1016
966
  const fullMsg = await (0, Utils_1.generateWAMessage)(jid, content, {
1017
967
  logger,
@@ -1098,7 +1048,9 @@ const makeMessagesSocket = (config) => {
1098
1048
  });
1099
1049
  }
1100
1050
  return fullMsg;
1101
- }
1051
+ /*
1052
+ } // Menutup `else` yang sebelumnya ada
1053
+ */
1102
1054
  }
1103
1055
  };
1104
1056
  };