Skip to content

Commit

Permalink
Correção na exibição do nome de arquivos
Browse files Browse the repository at this point in the history
  • Loading branch information
rtenorioh committed Dec 9, 2024
1 parent 41a7f75 commit db4d438
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 1 addition & 2 deletions backend/src/services/WbotServices/wbotMessageListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ interface Session extends Client {
const writeFileAsync = promisify(writeFile);

const verifyContact = async (msgContact: WbotContact): Promise<Contact> => {

const contactData = {
name: msgContact.name || msgContact.pushname || msgContact.id.user,
number: msgContact.id.user,
Expand Down Expand Up @@ -236,7 +235,7 @@ const verifyMediaMessage = async (
id: msg.id.id,
ticketId: ticket.id,
contactId: msg.fromMe ? undefined : contact.id,
body: $strBody,
body: $strBody || media.filename,
fromMe: msg.fromMe,
read: msg.fromMe,
mediaUrl: media.filename,
Expand Down
10 changes: 8 additions & 2 deletions frontend/src/components/MessagesList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,10 @@ const MessagesList = ({ ticketId, isGroup }) => {
})}
>
{message.quotedMsg && renderQuotedMessage(message)}
<MarkdownWrapper>{message.body}</MarkdownWrapper>
{(message.mediaType === "image"
? ''
: <MarkdownWrapper>{message.body}</MarkdownWrapper>
)}
<span className={classes.timestamp}>
{message.isEdited && <span>{i18n.t("message.edited")} </span>}
{format(parseISO(message.createdAt), "HH:mm")}
Expand Down Expand Up @@ -823,7 +826,10 @@ const MessagesList = ({ ticketId, isGroup }) => {
</div>
)}
{message.quotedMsg && renderQuotedMessage(message)}
<MarkdownWrapper>{message.body}</MarkdownWrapper>
{(message.mediaType === "image"
? ''
: <MarkdownWrapper>{message.body}</MarkdownWrapper>
)}
<span className={classes.timestamp}>
{message.isEdited && <span>{i18n.t("message.edited")} </span>}
{format(parseISO(message.createdAt), "HH:mm")}
Expand Down

0 comments on commit db4d438

Please sign in to comment.