@nuiisweety/baileys 0.1.10 → 0.1.11

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
@@ -7,7 +7,7 @@
7
7
  *Fork dari [`@whiskeysockets/baileys`](https://github.com/WhiskeySockets/Baileys) v7.0.0-rc11*
8
8
  *dikembangkan dengan sepenuh hati oleh **NuiiS4TORU***
9
9
 
10
- [![npm version](https://img.shields.io/badge/npm-0.1.10-pink?style=flat-square&logo=npm)](https://www.npmjs.com/package/@nuiisweety/baileys)
10
+ [![npm version](https://img.shields.io/badge/npm-0.1.11-pink?style=flat-square&logo=npm)](https://www.npmjs.com/package/@nuiisweety/baileys)
11
11
  [![license](https://img.shields.io/badge/license-MIT-lavender?style=flat-square)](LICENSE)
12
12
  [![based on](https://img.shields.io/badge/based%20on-@whiskeysockets%2Fbaileys-orchid?style=flat-square)](https://github.com/WhiskeySockets/Baileys)
13
13
 
@@ -878,10 +878,17 @@ export const prepareRichResponseMessage = (content) => {
878
878
  }
879
879
 
880
880
  /* build unifiedResponse JSON — gabungkan sections dari submessages + extraSections */
881
- const baseUnified = toUnified(submessages);
881
+ // Pisahkan footerSubs (teks setelah media) agar selalu muncul SETELAH extraSections (video/image)
882
+ const footerSubMessages = footerText ? [makeTextSub(footerText)] : [];
883
+ // Hapus footerText dari submessages jika sudah ada (sudah di-push sebelumnya)
884
+ const mainSubmessages = footerText
885
+ ? submessages.filter(s => !(s.messageType === RichSubMessageType.TEXT && s.messageText === footerText))
886
+ : submessages;
887
+ const baseUnified = toUnified(mainSubmessages);
888
+ const footerSections = footerSubMessages.map(buildUnifiedSection);
882
889
  const unified = extraSections && extraSections.length > 0
883
- ? { ...baseUnified, sections: [...baseUnified.sections, ...extraSections] }
884
- : baseUnified;
890
+ ? { ...baseUnified, sections: [...baseUnified.sections, ...extraSections, ...footerSections] }
891
+ : { ...baseUnified, sections: [...baseUnified.sections, ...footerSections] };
885
892
 
886
893
  const richResponseMessage = proto.AIRichResponseMessage.create({
887
894
  submessages,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuiisweety/baileys",
3
3
  "type": "module",
4
- "version": "0.1.10",
4
+ "version": "0.1.11",
5
5
  "description": "A WebSockets library for interacting with WhatsApp Web — forked STRICTLY from @whiskeysockets/baileys only, NOT from any other baileys fork. Modified by NuiiSweety.",
6
6
  "keywords": [
7
7
  "whatsapp",