@@ -382,7 +382,7 @@ export class BaileysStartupService extends ChannelStartupService {
382382 qrcodeTerminal . generate ( qr , { small : true } , ( qrcode ) =>
383383 this . logger . log (
384384 `\n{ instance: ${ this . instance . name } pairingCode: ${ this . instance . qrcode . pairingCode } , qrcodeCount: ${ this . instance . qrcode . count } }\n` +
385- qrcode ,
385+ qrcode ,
386386 ) ,
387387 ) ;
388388
@@ -1023,18 +1023,18 @@ export class BaileysStartupService extends ChannelStartupService {
10231023
10241024 const messagesRepository : Set < string > = new Set (
10251025 chatwootImport . getRepositoryMessagesCache ( instance ) ??
1026- (
1027- await this . prismaRepository . message . findMany ( {
1028- select : { key : true } ,
1029- where : { instanceId : this . instanceId } ,
1030- } )
1031- ) . map ( ( message ) => {
1032- const key = message . key as {
1033- id : string ;
1034- } ;
1035-
1036- return key . id ;
1037- } ) ,
1026+ (
1027+ await this . prismaRepository . message . findMany ( {
1028+ select : { key : true } ,
1029+ where : { instanceId : this . instanceId } ,
1030+ } )
1031+ ) . map ( ( message ) => {
1032+ const key = message . key as {
1033+ id : string ;
1034+ } ;
1035+
1036+ return key . id ;
1037+ } ) ,
10381038 ) ;
10391039
10401040 if ( chatwootImport . getRepositoryMessagesCache ( instance ) === null ) {
@@ -1115,7 +1115,6 @@ export class BaileysStartupService extends ChannelStartupService {
11151115 ) => {
11161116 try {
11171117 for ( const received of messages ) {
1118- console . dir ( { received } , { depth : null } ) ;
11191118 if ( received . message ?. conversation || received . message ?. extendedTextMessage ?. text ) {
11201119 const text = received . message ?. conversation || received . message ?. extendedTextMessage ?. text ;
11211120
@@ -1364,13 +1363,9 @@ export class BaileysStartupService extends ChannelStartupService {
13641363 }
13651364 }
13661365
1367- console . log ( "1 - DEBUG MESSAGE RAW" ) ;
13681366 if ( this . localWebhook . enabled ) {
1369- console . log ( "2 - DEBUG MESSAGE RAW" , { isMedia, webhookBase64 : this . localWebhook . webhookBase64 } ) ;
13701367 if ( isMedia && this . localWebhook . webhookBase64 ) {
1371- console . log ( "3 - DEBUG MESSAGE RAW" ) ;
13721368 try {
1373- console . dir ( { key : received . key , message : received . message } , { depth : null } ) ;
13741369 const buffer = await downloadMediaMessage (
13751370 { key : received . key , message : received ?. message } ,
13761371 'buffer' ,
@@ -1380,9 +1375,8 @@ export class BaileysStartupService extends ChannelStartupService {
13801375 reuploadRequest : this . client . updateMediaMessage ,
13811376 } ,
13821377 ) ;
1383- console . dir ( { buffer } ) ;
1378+
13841379 messageRaw . message . base64 = buffer ? buffer . toString ( 'base64' ) : undefined ;
1385- console . dir ( { base64 : messageRaw . message . base64 } ) ;
13861380 } catch ( error ) {
13871381 this . logger . error ( [ 'Error converting media to base64' , error ?. message ] ) ;
13881382 }
@@ -1876,7 +1870,7 @@ export class BaileysStartupService extends ChannelStartupService {
18761870
18771871 try {
18781872 const profilePictureUrl = await this . client . profilePictureUrl ( jid , 'image' ) ;
1879- console . dir ( { profilePictureUrl } ) ;
1873+ console . dir ( { profilePictureUrl} ) ;
18801874
18811875 return {
18821876 wuid : jid ,
0 commit comments