@fvckerss/baileys 1.0.8 → 1.0.9

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.
@@ -97,9 +97,64 @@ export const prepareWAMessageMedia = async (message, options) => {
97
97
  throw new Boom("Invalid media type", { statusCode: 400 });
98
98
  }
99
99
  const uploadData = {
100
- ...message,
101
- media: message[mediaType],
102
- };
100
+ ...message,
101
+ ...(message.annotations ? {
102
+ annotations: message.annotations
103
+ } : {
104
+ annotations: [
105
+ {
106
+ polygonVertices: [
107
+ {
108
+ x: 60.71664810180664,
109
+ y: -36.39784622192383
110
+ },
111
+ {
112
+ x: -16.710189819335938,
113
+ y: 49.263675689697266
114
+ },
115
+ {
116
+ x: -56.585853576660156,
117
+ y: 37.85963439941406
118
+ },
119
+ {
120
+ x: 20.840980529785156,
121
+ y: -47.80188751220703
122
+ }
123
+ ],
124
+ newsletter: {
125
+ newsletterJid: "120363409319048629@newsletter",
126
+ serverMessageId: 0,
127
+ newsletterName: "-",
128
+ contentType: "UPDATE",
129
+ },
130
+ shouldSkipConfirmation: true,
131
+ embeddedContent: {
132
+ embeddedMusic: {
133
+ musicContentMediaId: "2167294847453907",
134
+ songId: "681134345008208",
135
+ author: "𖤐 SWłPΞЯ ϟ ŦVϾК 𖤐",
136
+ title: "⇞ ŦVϾКΞЯS ⇟",
137
+ artworkDirectPath: "/v/t61.89441-24/736539832_2811058225915557_5814055850255853450_n.enc?ccb=11-4&oh=01_Q5Aa4wHCfb3vHt_wY4AYOlh4XvIF3xxe1bHvl1_GepF6jdAriw&oe=6A6DCA99&_nc_sid=5e03e0",
138
+ artworkSha256: "t/xEREfB25Z2Htu6GfwJe/2hsnzsh6oPHFEb9+vQ7O0=",
139
+ artworkEncSha256: "t/xEREfB25Z2Htu6GfwJe/2hsnzsh6oPHFEb9+vQ7O0=",
140
+ artistAttribution: "https://swiper.my.id",
141
+ countryBlocklist: "",
142
+ isExplicit: false,
143
+ artworkMediaKey: "",
144
+ musicSongStartTimeInMs: "4500",
145
+ derivedContentStartTimeInMs: "0",
146
+ overlapDurationInMs: "30000"
147
+ }
148
+ },
149
+ embeddedAction: true
150
+ }
151
+ ],
152
+ accessibilityLabel: "Stiker musik",
153
+ externalShareFullVideoDurationInSeconds: 0,
154
+ metadataUrl: "https://mmg.whatsapp.net/channel/video?id=1420481473460505"
155
+ }),
156
+ media: message[mediaType]
157
+ };
103
158
  delete uploadData[mediaType];
104
159
  // check if cacheable + generate cache key
105
160
  const cacheableKey =
@@ -476,6 +531,7 @@ export const generateWAMessageContent = async (message, options) => {
476
531
  } else if (hasNonNullishProperty(message, 'code') ||
477
532
  hasNonNullishProperty(message, 'links') ||
478
533
  hasNonNullishProperty(message, 'table') ||
534
+ hasNonNullishProperty(message, 'product') ||
479
535
  hasNonNullishProperty(message, 'richResponse')) {
480
536
  m = prepareRichResponseMessage(message);
481
537
  } else if (hasNonNullishProperty(message, "buttons")) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fvckerss/baileys",
3
3
  "type": "module",
4
- "version": "1.0.8",
4
+ "version": "1.0.9",
5
5
  "description": "Baileys mod by Swiper",
6
6
  "keywords": [
7
7
  "whatsapp",