@@ -104,6 +104,7 @@ import makeWASocket, {
104104 DisconnectReason ,
105105 downloadContentFromMessage ,
106106 downloadMediaMessage ,
107+ generateMessageIDV2 ,
107108 generateWAMessageFromContent ,
108109 getAggregateVotesInPollMessage ,
109110 GetCatalogOptions ,
@@ -2225,6 +2226,11 @@ export class BaileysStartupService extends ChannelStartupService {
22252226 return error ;
22262227 }
22272228 }
2229+ public generateMessageID ( ) {
2230+ return {
2231+ id : generateMessageIDV2 ( this . client . user ?. id ) ,
2232+ } ;
2233+ }
22282234
22292235 private async generateLinkPreview ( text : string ) {
22302236 try {
@@ -2534,7 +2540,7 @@ export class BaileysStartupService extends ChannelStartupService {
25342540 mentions ,
25352541 linkPreview ,
25362542 quoted ,
2537- null ,
2543+ options ?. messageId ?? null ,
25382544 group ?. ephemeralDuration ,
25392545 previewContext ,
25402546 // group?.participants,
@@ -2558,7 +2564,7 @@ export class BaileysStartupService extends ChannelStartupService {
25582564 mentions ,
25592565 linkPreview ,
25602566 quoted ,
2561- null ,
2567+ options ?. messageId ?? null ,
25622568 undefined ,
25632569 contextInfo ,
25642570 ) ;
@@ -2790,6 +2796,7 @@ export class BaileysStartupService extends ChannelStartupService {
27902796 linkPreview : data ?. linkPreview ,
27912797 mentionsEveryOne : data ?. mentionsEveryOne ,
27922798 mentioned : data ?. mentioned ,
2799+ messageId : data ?. messageId ,
27932800 } ,
27942801 isIntegration ,
27952802 ) ;
@@ -2806,6 +2813,7 @@ export class BaileysStartupService extends ChannelStartupService {
28062813 linkPreview : data ?. linkPreview ,
28072814 mentionsEveryOne : data ?. mentionsEveryOne ,
28082815 mentioned : data ?. mentioned ,
2816+ messageId : data ?. messageId ,
28092817 } ,
28102818 ) ;
28112819 }
@@ -3119,6 +3127,7 @@ export class BaileysStartupService extends ChannelStartupService {
31193127 quoted : data ?. quoted ,
31203128 mentionsEveryOne : data ?. mentionsEveryOne ,
31213129 mentioned : data ?. mentioned ,
3130+ messageId : data ?. messageId ,
31223131 } ,
31233132 ) ;
31243133
@@ -3141,6 +3150,7 @@ export class BaileysStartupService extends ChannelStartupService {
31413150 quoted : data ?. quoted ,
31423151 mentionsEveryOne : data ?. mentionsEveryOne ,
31433152 mentioned : data ?. mentioned ,
3153+ messageId : data ?. messageId ,
31443154 } ,
31453155 isIntegration ,
31463156 ) ;
@@ -3157,6 +3167,7 @@ export class BaileysStartupService extends ChannelStartupService {
31573167 quoted : data ?. quoted ,
31583168 mentionsEveryOne : data ?. mentionsEveryOne ,
31593169 mentioned : data ?. mentioned ,
3170+ messageId : data ?. messageId ,
31603171 } ;
31613172
31623173 if ( file ) mediaData . media = file . buffer . toString ( 'base64' ) ;
@@ -3172,6 +3183,7 @@ export class BaileysStartupService extends ChannelStartupService {
31723183 quoted : data ?. quoted ,
31733184 mentionsEveryOne : data ?. mentionsEveryOne ,
31743185 mentioned : data ?. mentioned ,
3186+ messageId : data ?. messageId ,
31753187 } ,
31763188 isIntegration ,
31773189 ) ;
0 commit comments