Skip to content

Commit

Permalink
fix quoted messages not showing on devices - fix #146
Browse files Browse the repository at this point in the history
  • Loading branch information
allgood committed Sep 15, 2024
1 parent 5dc60e0 commit b76302c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 1 addition & 3 deletions backend/src/services/WbotServices/SendWhatsAppMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ const SendWhatsAppMessage = async ({
options = {
quoted: {
key: msgFound?.key || chatMessage.id,
message: {
extendedTextMessage: msgFound?.message.extendedTextMessage
}
message: msgFound?.message
}
};
}
Expand Down
7 changes: 4 additions & 3 deletions backend/src/services/WbotServices/wbotMessageListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,13 @@ const downloadMedia = async (msg: proto.IWebMessageInfo, wbot: Session, ticket:
while (contDownload < 10 && !stream) {
try {

if (message?.directPath) {
message.url = "";
const tmpMessage = { ...message };
if (tmpMessage?.directPath) {
tmpMessage.url = "";
}

// eslint-disable-next-line no-await-in-loop
stream = await downloadContentFromMessage(message, messageType);
stream = await downloadContentFromMessage(tmpMessage, messageType);
} catch (error) {
contDownload += 1;
// eslint-disable-next-line no-await-in-loop, no-loop-func
Expand Down

0 comments on commit b76302c

Please sign in to comment.