mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-24 17:38:40 -06:00
reverse
This commit is contained in:
parent
58e1f68e20
commit
52a6279402
@ -1115,7 +1115,6 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
) => {
|
||||
try {
|
||||
for (const received of messages) {
|
||||
console.dir({ received }, { depth: null });
|
||||
if (received.message?.conversation || received.message?.extendedTextMessage?.text) {
|
||||
const text = received.message?.conversation || received.message?.extendedTextMessage?.text;
|
||||
|
||||
@ -1364,13 +1363,9 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
}
|
||||
}
|
||||
|
||||
console.log("1 - DEBUG MESSAGE RAW");
|
||||
if (this.localWebhook.enabled) {
|
||||
console.log("2 - DEBUG MESSAGE RAW", {isMedia, webhookBase64: this.localWebhook.webhookBase64});
|
||||
if (isMedia && this.localWebhook.webhookBase64) {
|
||||
console.log("3 - DEBUG MESSAGE RAW");
|
||||
try {
|
||||
console.dir({ key: received.key, message: received.message }, { depth: null });
|
||||
const buffer = await downloadMediaMessage(
|
||||
{ key: received.key, message: received?.message },
|
||||
'buffer',
|
||||
@ -1380,9 +1375,8 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
reuploadRequest: this.client.updateMediaMessage,
|
||||
},
|
||||
);
|
||||
console.dir({ buffer });
|
||||
|
||||
messageRaw.message.base64 = buffer ? buffer.toString('base64') : undefined;
|
||||
console.dir({ base64: messageRaw.message.base64 });
|
||||
} catch (error) {
|
||||
this.logger.error(['Error converting media to base64', error?.message]);
|
||||
}
|
||||
@ -1876,7 +1870,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
|
||||
try {
|
||||
const profilePictureUrl = await this.client.profilePictureUrl(jid, 'image');
|
||||
console.dir({ profilePictureUrl });
|
||||
console.dir({profilePictureUrl});
|
||||
|
||||
return {
|
||||
wuid: jid,
|
||||
|
Loading…
Reference in New Issue
Block a user