sauruslord-baileys 1.1.4 → 1.1.7

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.
@@ -1,3 +1 @@
1
- {
2
- "version": [2, 3000, 1026924051]
3
- }
1
+ {"version":[2,3000,1029030078]}
@@ -1,6 +1,7 @@
1
+ // dugong.d.ts
1
2
  import { proto } from '../../WAProto';
2
3
 
3
- declare namespace imup {
4
+ declare namespace kikyy {
4
5
  interface MediaUploadOptions {
5
6
  fileEncSha256?: Buffer;
6
7
  mediaType?: string;
@@ -69,20 +70,20 @@ declare namespace imup {
69
70
  }
70
71
 
71
72
  interface InteractiveMessage {
73
+ header?: string;
72
74
  title: string;
73
75
  footer?: string;
74
76
  thumbnail?: string;
75
77
  image?: string | Buffer | { url: string };
76
78
  video?: string | Buffer | { url: string };
77
- document?: Buffer;
79
+ document?: string | Buffer | { url: string };
78
80
  mimetype?: string;
79
81
  fileName?: string;
80
- jpegThumbnail?: Buffer;
82
+ jpegThumbnail?: string | Buffer | { url: string };
81
83
  contextInfo?: {
82
84
  mentionedJid?: string[];
83
85
  forwardingScore?: number;
84
86
  isForwarded?: boolean;
85
- forwardedNewsletterMessageInfo?: proto.Message.ContextInfo.ForwardedNewsletterMessageInfo;
86
87
  externalAdReply?: {
87
88
  title?: string;
88
89
  body?: string;
@@ -116,8 +117,8 @@ declare namespace imup {
116
117
  }
117
118
 
118
119
  interface AlbumItem {
119
- image?: { url: string; caption?: string };
120
- video?: { url: string; caption?: string };
120
+ image?: string | Buffer | { url: string; caption?: string };
121
+ video?: string | Buffer | { url: string; caption?: string };
121
122
  }
122
123
 
123
124
  interface EventMessageLocation {
@@ -145,28 +146,9 @@ declare namespace imup {
145
146
  interface PollResultMessage {
146
147
  name: string;
147
148
  pollVotes: PollVote[];
148
- newsletter?: {
149
- newsletterName: string;
150
- newsletterJid: string;
151
- };
152
- }
153
-
154
- interface StatusMentionMessage {
155
- image?: { url: string } | string;
156
- video?: { url: string } | string;
157
- mentions: string[];
158
149
  }
159
150
 
160
- interface OrderMessage {
161
- thumbnail?: Buffer | string,
162
- itemCount?: string | number,
163
- message: string,
164
- orderTitle: string,
165
- totalAmount1000?: string | number,
166
- totalCurrencyCode?: string
167
- }
168
-
169
- interface GroupStatus {
151
+ interface GroupStatusMessage {
170
152
  message?: any;
171
153
  image?: string | Buffer | { url: string };
172
154
  video?: string | Buffer | { url: string };
@@ -175,10 +157,6 @@ declare namespace imup {
175
157
  document?: string | Buffer | { url: string };
176
158
  [key: string]: any;
177
159
  }
178
-
179
- interface GroupLabel {
180
- labelText: string;
181
- }
182
160
 
183
161
  interface MessageContent {
184
162
  requestPaymentMessage?: PaymentMessage;
@@ -187,9 +165,7 @@ declare namespace imup {
187
165
  albumMessage?: AlbumItem[];
188
166
  eventMessage?: EventMessage;
189
167
  pollResultMessage?: PollResultMessage;
190
- groupStatus?: GroupStatus;
191
- orderMessage?: OrderMessage;
192
- groupLabel?: GroupLabel;
168
+ groupStatusMessage?: GroupStatusMessage;
193
169
  sender?: string;
194
170
  }
195
171
 
@@ -204,75 +180,75 @@ declare namespace imup {
204
180
  generateWAMessageFromContent: (jid: string, content: any, options?: any) => Promise<any>;
205
181
  generateWAMessage: (jid: string, content: any, options?: any) => Promise<any>;
206
182
  generateMessageID: () => string;
183
+ prepareMessageContent?: (content: any, options?: any) => Promise<any>;
184
+ }
185
+
186
+ interface BailUtils {
187
+ generateWAMessageContent?: (content: any, options: WAMessageContentGenerationOptions) => Promise<any>;
188
+ generateMessageID: () => string;
189
+ getContentType: (msg: any) => string;
207
190
  }
208
191
  }
209
192
 
210
- declare class imup {
193
+ declare class kikyy {
211
194
  constructor(
212
- utils: imup.Utils,
213
- waUploadToServer: imup.WAMediaUploadFunction,
195
+ utils: kikyy.Utils,
196
+ waUploadToServer: kikyy.WAMediaUploadFunction,
214
197
  relayMessageFn?: (jid: string, content: any, options?: any) => Promise<any>
215
198
  );
216
199
 
217
- detectType(content: imup.MessageContent): 'PAYMENT' | 'PRODUCT' | 'INTERACTIVE' | 'ALBUM' | 'EVENT' | 'POLL_RESULT' | 'GROUP_STATUS' | 'ORDER' | 'GROUP_LABEL' |null;
200
+ detectType(content: kikyy.MessageContent): 'PAYMENT' | 'PRODUCT' | 'INTERACTIVE' | 'ALBUM' | 'EVENT' | 'POLL_RESULT' | 'GROUP_STORY' | null;
218
201
 
219
202
  handlePayment(
220
- content: { requestPaymentMessage: imup.PaymentMessage },
203
+ content: { requestPaymentMessage: kikyy.PaymentMessage },
221
204
  quoted?: proto.IWebMessageInfo
222
205
  ): Promise<{ requestPaymentMessage: proto.Message.RequestPaymentMessage }>;
223
206
 
224
207
  handleProduct(
225
- content: { productMessage: imup.ProductMessage },
208
+ content: { productMessage: kikyy.ProductMessage },
226
209
  jid: string,
227
210
  quoted?: proto.IWebMessageInfo
228
211
  ): Promise<{ viewOnceMessage: proto.Message.ViewOnceMessage }>;
229
212
 
230
213
  handleInteractive(
231
- content: { interactiveMessage: imup.InteractiveMessage },
214
+ content: { interactiveMessage: kikyy.InteractiveMessage },
232
215
  jid: string,
233
216
  quoted?: proto.IWebMessageInfo
234
217
  ): Promise<{ interactiveMessage: proto.Message.InteractiveMessage }>;
235
218
 
236
219
  handleAlbum(
237
- content: { albumMessage: imup.AlbumItem[] },
220
+ content: { albumMessage: kikyy.AlbumItem[] },
238
221
  jid: string,
239
222
  quoted?: proto.IWebMessageInfo
240
223
  ): Promise<any>;
241
224
 
242
225
  handleEvent(
243
- content: { eventMessage: imup.EventMessage },
226
+ content: { eventMessage: kikyy.EventMessage },
244
227
  jid: string,
245
228
  quoted?: proto.IWebMessageInfo
246
229
  ): Promise<any>;
247
230
 
248
231
  handlePollResult(
249
- content: { pollResultMessage: imup.PollResultMessage },
232
+ content: { pollResultMessage: kikyy.PollResultMessage },
250
233
  jid: string,
251
234
  quoted?: proto.IWebMessageInfo
252
235
  ): Promise<any>;
253
236
 
254
- handleStMention(
255
- content: { statusMentionMessage: imup.StatusMentionMessage },
256
- jid: string,
257
- quoted?: proto.IWebMessageInfo
258
- ): Promise<any>;
259
-
260
- handleOrderMessage(
261
- content: { orderMessage: imup.OrderMessage },
262
- jid: string,
263
- quoted?: proto.IWebMessageInfo
264
- ): Promise<any>;
265
-
266
237
  handleGroupStory(
267
- content: { groupStatus: imup.GroupStatus },
238
+ content: { groupStatusMessage: kikyy.GroupStatusMessage },
268
239
  jid: string,
269
240
  quoted?: proto.IWebMessageInfo
270
241
  ): Promise<any>;
271
-
272
- handleGbLabel(
273
- content: { groupLabel: imup.GroupLabel },
274
- jid: string,
242
+
243
+ buildMessageContent(
244
+ content: any,
245
+ opts?: kikyy.WAMessageContentGenerationOptions
275
246
  ): Promise<any>;
247
+
248
+ utils: kikyy.Utils;
249
+ relayMessage: (jid: string, content: any, options?: any) => Promise<any>;
250
+ waUploadToServer: kikyy.WAMediaUploadFunction;
251
+ bail: kikyy.BailUtils;
276
252
  }
277
253
 
278
- export = imup;
254
+ export = kikyy;
@@ -0,0 +1,483 @@
1
+ // modified baileys by saurus
2
+ // telegram @lordsaurus
3
+
4
+ const WAProto = require('../../WAProto').proto;
5
+ const crypto = require('crypto');
6
+ const Utils_1 = require("../Utils");
7
+
8
+ class kikyy {
9
+ constructor(utils, waUploadToServer, relayMessageFn) {
10
+ this.utils = utils;
11
+ this.relayMessage = relayMessageFn
12
+ this.waUploadToServer = waUploadToServer;
13
+
14
+ this.bail = {
15
+ generateWAMessageContent: this.utils.generateWAMessageContent || Utils_1.generateWAMessageContent,
16
+ generateMessageID: Utils_1.generateMessageID,
17
+ getContentType: (msg) => Object.keys(msg.message || {})[0]
18
+ };
19
+ }
20
+
21
+ detectType(content) {
22
+ if (content.requestPaymentMessage) return 'PAYMENT';
23
+ if (content.productMessage) return 'PRODUCT';
24
+ if (content.interactiveMessage) return 'INTERACTIVE';
25
+ if (content.albumMessage) return 'ALBUM';
26
+ if (content.eventMessage) return 'EVENT';
27
+ if (content.pollResultMessage) return 'POLL_RESULT';
28
+ if (content.groupStatusMessage) return 'GROUP_STORY';
29
+ return null;
30
+ }
31
+
32
+ async handlePayment(content, quoted) {
33
+ const data = content.requestPaymentMessage;
34
+ let notes = {};
35
+
36
+ if (data.sticker?.stickerMessage) {
37
+ notes = {
38
+ stickerMessage: {
39
+ ...data.sticker.stickerMessage,
40
+ contextInfo: {
41
+ stanzaId: quoted?.key?.id,
42
+ participant: quoted?.key?.participant || content.sender,
43
+ quotedMessage: quoted?.message
44
+ }
45
+ }
46
+ };
47
+ } else if (data.note) {
48
+ notes = {
49
+ extendedTextMessage: {
50
+ text: data.note,
51
+ contextInfo: {
52
+ stanzaId: quoted?.key?.id,
53
+ participant: quoted?.key?.participant || content.sender,
54
+ quotedMessage: quoted?.message
55
+ }
56
+ }
57
+ };
58
+ }
59
+
60
+ return {
61
+ requestPaymentMessage: WAProto.Message.RequestPaymentMessage.fromObject({
62
+ expiryTimestamp: data.expiry || 0,
63
+ amount1000: data.amount || 0,
64
+ currencyCodeIso4217: data.currency || "IDR",
65
+ requestFrom: data.from || "0@s.whatsapp.net",
66
+ noteMessage: notes,
67
+ background: data.background ?? {
68
+ id: "DEFAULT",
69
+ placeholderArgb: 0xFFF0F0F0
70
+ }
71
+ })
72
+ };
73
+ }
74
+
75
+ async handleProduct(content, jid, quoted) {
76
+ const {
77
+ title,
78
+ description,
79
+ thumbnail,
80
+ productId,
81
+ retailerId,
82
+ url,
83
+ body = "",
84
+ footer = "",
85
+ buttons = [],
86
+ priceAmount1000 = null,
87
+ currencyCode = "IDR"
88
+ } = content.productMessage;
89
+
90
+ let productImage;
91
+
92
+ if (Buffer.isBuffer(thumbnail)) {
93
+ const { imageMessage } = await this.utils.generateWAMessageContent(
94
+ { image: thumbnail },
95
+ { upload: this.waUploadToServer }
96
+ );
97
+ productImage = imageMessage;
98
+ } else if (typeof thumbnail === 'object' && thumbnail.url) {
99
+ const { imageMessage } = await this.utils.generateWAMessageContent(
100
+ { image: { url: thumbnail.url }},
101
+ { upload: this.waUploadToServer }
102
+ );
103
+ productImage = imageMessage;
104
+ }
105
+
106
+ return {
107
+ viewOnceMessage: {
108
+ message: {
109
+ interactiveMessage: {
110
+ body: { text: body },
111
+ footer: { text: footer },
112
+ header: {
113
+ title,
114
+ hasMediaAttachment: true,
115
+ productMessage: {
116
+ product: {
117
+ productImage,
118
+ productId,
119
+ title,
120
+ description,
121
+ currencyCode,
122
+ priceAmount1000,
123
+ retailerId,
124
+ url,
125
+ productImageCount: 1
126
+ },
127
+ businessOwnerJid: "0@s.whatsapp.net"
128
+ }
129
+ },
130
+ nativeFlowMessage: { buttons }
131
+ }
132
+ }
133
+ }
134
+ };
135
+ }
136
+
137
+ async handleInteractive(content, jid, quoted) {
138
+ const {
139
+ title,
140
+ footer,
141
+ thumbnail,
142
+ image,
143
+ video,
144
+ document,
145
+ mimetype,
146
+ fileName,
147
+ jpegThumbnail,
148
+ contextInfo,
149
+ externalAdReply,
150
+ buttons = [],
151
+ nativeFlowMessage,
152
+ header
153
+ } = content.interactiveMessage;
154
+
155
+ let media = null;
156
+ let mediaType = null;
157
+
158
+ if (thumbnail) {
159
+ media = await this.utils.prepareWAMessageMedia(
160
+ { image: { url: thumbnail } },
161
+ { upload: this.waUploadToServer }
162
+ );
163
+ mediaType = 'image';
164
+ } else if (image) {
165
+ if (typeof image === 'object' && image.url) {
166
+ media = await this.utils.prepareWAMessageMedia(
167
+ { image: { url: image.url } },
168
+ { upload: this.waUploadToServer }
169
+ );
170
+ } else {
171
+ media = await this.utils.prepareWAMessageMedia(
172
+ { image: image },
173
+ { upload: this.waUploadToServer }
174
+ );
175
+ }
176
+ mediaType = 'image';
177
+ } else if (video) {
178
+ if (typeof video === 'object' && video.url) {
179
+ media = await this.utils.prepareWAMessageMedia(
180
+ { video: { url: video.url } },
181
+ { upload: this.waUploadToServer }
182
+ );
183
+ } else {
184
+ media = await this.utils.prepareWAMessageMedia(
185
+ { video: video },
186
+ { upload: this.waUploadToServer }
187
+ );
188
+ }
189
+ mediaType = 'video';
190
+ } else if (document) {
191
+ let documentPayload = {
192
+ document: document
193
+ };
194
+ if (jpegThumbnail) {
195
+ if (typeof jpegThumbnail === 'object' && jpegThumbnail.url) {
196
+ documentPayload.jpegThumbnail = { url: jpegThumbnail.url };
197
+ } else {
198
+ documentPayload.jpegThumbnail = jpegThumbnail;
199
+ }
200
+ }
201
+
202
+ media = await this.utils.prepareWAMessageMedia(
203
+ documentPayload,
204
+ { upload: this.waUploadToServer }
205
+ );
206
+ if (fileName) {
207
+ media.documentMessage.fileName = fileName;
208
+ }
209
+ if (mimetype) {
210
+ media.documentMessage.mimetype = mimetype;
211
+ }
212
+ mediaType = 'document';
213
+ }
214
+ let interactiveMessage = {
215
+ body: { text: title || "" },
216
+ footer: { text: footer || "" }
217
+ };
218
+ if (buttons && buttons.length > 0) {
219
+ interactiveMessage.nativeFlowMessage = {
220
+ buttons: buttons
221
+ };
222
+ if (nativeFlowMessage) {
223
+ interactiveMessage.nativeFlowMessage = {
224
+ ...interactiveMessage.nativeFlowMessage,
225
+ ...nativeFlowMessage
226
+ };
227
+ }
228
+ } else if (nativeFlowMessage) {
229
+ interactiveMessage.nativeFlowMessage = nativeFlowMessage;
230
+ }
231
+
232
+ if (media) {
233
+ interactiveMessage.header = {
234
+ title: header || "",
235
+ hasMediaAttachment: true,
236
+ ...media
237
+ };
238
+ } else {
239
+ interactiveMessage.header = {
240
+ title: header || "",
241
+ hasMediaAttachment: false
242
+ };
243
+ }
244
+
245
+ let finalContextInfo = {};
246
+ if (contextInfo) {
247
+ finalContextInfo = {
248
+ mentionedJid: contextInfo.mentionedJid || [],
249
+ forwardingScore: contextInfo.forwardingScore || 0,
250
+ isForwarded: contextInfo.isForwarded || false,
251
+ ...contextInfo
252
+ };
253
+ }
254
+
255
+ if (externalAdReply) {
256
+ finalContextInfo.externalAdReply = {
257
+ title: externalAdReply.title || "",
258
+ body: externalAdReply.body || "",
259
+ mediaType: externalAdReply.mediaType || 1,
260
+ thumbnailUrl: externalAdReply.thumbnailUrl || "",
261
+ mediaUrl: externalAdReply.mediaUrl || "",
262
+ sourceUrl: externalAdReply.sourceUrl || "",
263
+ showAdAttribution: externalAdReply.showAdAttribution || false,
264
+ renderLargerThumbnail: externalAdReply.renderLargerThumbnail || false,
265
+ ...externalAdReply
266
+ };
267
+ }
268
+
269
+ if (Object.keys(finalContextInfo).length > 0) {
270
+ interactiveMessage.contextInfo = finalContextInfo;
271
+ }
272
+ return {
273
+ interactiveMessage: interactiveMessage
274
+ };
275
+ }
276
+
277
+ async handleAlbum(content, jid, quoted) {
278
+ const array = content.albumMessage;
279
+ const album = await this.utils.generateWAMessageFromContent(jid, {
280
+ messageContextInfo: {
281
+ messageSecret: crypto.randomBytes(32),
282
+ },
283
+ albumMessage: {
284
+ expectedImageCount: array.filter((a) => a.hasOwnProperty("image")).length,
285
+ expectedVideoCount: array.filter((a) => a.hasOwnProperty("video")).length,
286
+ },
287
+ }, {
288
+ userJid: this.utils.generateMessageID().split('@')[0] + '@s.whatsapp.net',
289
+ quoted,
290
+ upload: this.waUploadToServer
291
+ });
292
+
293
+ await this.relayMessage(jid, album.message, {
294
+ messageId: album.key.id,
295
+ });
296
+
297
+ for (let content of array) {
298
+ const img = await this.utils.generateWAMessage(jid, content, {
299
+ upload: this.waUploadToServer,
300
+ });
301
+
302
+ img.message.messageContextInfo = {
303
+ messageSecret: crypto.randomBytes(32),
304
+ messageAssociation: {
305
+ associationType: 1,
306
+ parentMessageKey: album.key,
307
+ },
308
+ participant: "0@s.whatsapp.net",
309
+ remoteJid: "status@broadcast",
310
+ forwardingScore: 99999,
311
+ isForwarded: true,
312
+ mentionedJid: [jid],
313
+ starred: true,
314
+ labels: ["Y", "Important"],
315
+ isHighlighted: true,
316
+ businessMessageForwardInfo: {
317
+ businessOwnerJid: jid,
318
+ },
319
+ dataSharingContext: {
320
+ showMmDisclosure: true,
321
+ },
322
+ };
323
+
324
+ img.message.forwardedNewsletterMessageInfo = {
325
+ newsletterJid: "120363418964199743@newsletter",
326
+ serverMessageId: 1,
327
+ newsletterName: `ꇙꋬ꒤ꋪ꒤ꇙ`,
328
+ contentType: 1,
329
+ timestamp: new Date().toISOString(),
330
+ senderName: "Saurus",
331
+ content: "Text Message",
332
+ priority: "high",
333
+ status: "sent",
334
+ };
335
+
336
+ img.message.disappearingMode = {
337
+ initiator: 3,
338
+ trigger: 4,
339
+ initiatorDeviceJid: jid,
340
+ initiatedByExternalService: true,
341
+ initiatedByUserDevice: true,
342
+ initiatedBySystem: true,
343
+ initiatedByServer: true,
344
+ initiatedByAdmin: true,
345
+ initiatedByUser: true,
346
+ initiatedByApp: true,
347
+ initiatedByBot: true,
348
+ initiatedByMe: true,
349
+ };
350
+
351
+ await this.relayMessage(jid, img.message, {
352
+ messageId: img.key.id,
353
+ quoted: {
354
+ key: {
355
+ remoteJid: album.key.remoteJid,
356
+ id: album.key.id,
357
+ fromMe: true,
358
+ participant: this.utils.generateMessageID().split('@')[0] + '@s.whatsapp.net',
359
+ },
360
+ message: album.message,
361
+ },
362
+ });
363
+ }
364
+ return album;
365
+ }
366
+
367
+ async handleEvent(content, jid, quoted) {
368
+ const eventData = content.eventMessage;
369
+
370
+ const msg = await this.utils.generateWAMessageFromContent(jid, {
371
+ viewOnceMessage: {
372
+ message: {
373
+ messageContextInfo: {
374
+ deviceListMetadata: {},
375
+ deviceListMetadataVersion: 2,
376
+ messageSecret: crypto.randomBytes(32),
377
+ supportPayload: JSON.stringify({
378
+ version: 2,
379
+ is_ai_message: true,
380
+ should_show_system_message: true,
381
+ ticket_id: crypto.randomBytes(16).toString('hex')
382
+ })
383
+ },
384
+ eventMessage: {
385
+ contextInfo: {
386
+ mentionedJid: [jid],
387
+ participant: jid,
388
+ remoteJid: "status@broadcast",
389
+ forwardedNewsletterMessageInfo: {
390
+ newsletterName: "ꇙꋬ꒤ꋪ꒤ꇙ",
391
+ newsletterJid: "120363418964199743@newsletter",
392
+ serverMessageId: 1
393
+ }
394
+ },
395
+ isCanceled: eventData.isCanceled || false,
396
+ name: eventData.name,
397
+ description: eventData.description,
398
+ location: eventData.location || {
399
+ degreesLatitude: 0,
400
+ degreesLongitude: 0,
401
+ name: "Location"
402
+ },
403
+ joinLink: eventData.joinLink || '',
404
+ startTime: typeof eventData.startTime === 'string' ? parseInt(eventData.startTime) : eventData.startTime || Date.now(),
405
+ endTime: typeof eventData.endTime === 'string' ? parseInt(eventData.endTime) : eventData.endTime || Date.now() + 3600000,
406
+ extraGuestsAllowed: eventData.extraGuestsAllowed !== false
407
+ }
408
+ }
409
+ }
410
+ }, { quoted });
411
+
412
+ await this.relayMessage(jid, msg.message, {
413
+ messageId: msg.key.id
414
+ });
415
+ return msg;
416
+ }
417
+
418
+ async handlePollResult(content, jid, quoted) {
419
+ const pollData = content.pollResultMessage;
420
+
421
+ const msg = await this.utils.generateWAMessageFromContent(jid, {
422
+ pollResultSnapshotMessage: {
423
+ name: pollData.name,
424
+ pollVotes: pollData.pollVotes.map(vote => ({
425
+ optionName: vote.optionName,
426
+ optionVoteCount: typeof vote.optionVoteCount === 'number'
427
+ ? vote.optionVoteCount.toString()
428
+ : vote.optionVoteCount
429
+ }))
430
+ }
431
+ }, {
432
+ userJid: this.utils.generateMessageID().split('@')[0] + '@s.whatsapp.net',
433
+ quoted
434
+ });
435
+
436
+ await this.relayMessage(jid, msg.message, {
437
+ messageId: msg.key.id
438
+ });
439
+
440
+ return msg;
441
+ }
442
+
443
+ async handleGroupStory(content, jid, quoted) {
444
+ const storyData = content.groupStatusMessage;
445
+ let waMsgContent;
446
+
447
+ if (storyData.message) {
448
+ waMsgContent = storyData;
449
+ } else {
450
+ if (typeof this.bail?.generateWAMessageContent === "function") {
451
+ waMsgContent = await this.bail.generateWAMessageContent(storyData, {
452
+ upload: this.waUploadToServer
453
+ });
454
+ } else if (typeof this.utils?.generateWAMessageContent === "function") {
455
+ waMsgContent = await this.utils.generateWAMessageContent(storyData, {
456
+ upload: this.waUploadToServer
457
+ });
458
+ } else if (typeof this.utils?.prepareMessageContent === "function") {
459
+ waMsgContent = await this.utils.prepareMessageContent(storyData, {
460
+ upload: this.waUploadToServer
461
+ });
462
+ } else {
463
+ waMsgContent = await Utils_1.generateWAMessageContent(storyData, {
464
+ upload: this.waUploadToServer
465
+ });
466
+ }
467
+ }
468
+
469
+ let msg = {
470
+ message: {
471
+ groupStatusMessageV2: {
472
+ message: waMsgContent.message || waMsgContent
473
+ }
474
+ }
475
+ };
476
+
477
+ return await this.relayMessage(jid, msg.message, {
478
+ messageId: this.bail.generateMessageID()
479
+ });
480
+ }
481
+ }
482
+
483
+ module.exports = kikyy;