Skip to content

Commit

Permalink
Atualização no Location
Browse files Browse the repository at this point in the history
  • Loading branch information
rtenorioh committed Feb 9, 2024
1 parent 130bb54 commit 5f1076d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions backend/src/services/WbotServices/wbotMessageListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ const prepareLocation = (msg: WbotMessage): WbotMessage => {
const gmapsUrl = `https://maps.google.com/maps?q=${msg.location.latitude}%2C${msg.location.longitude}&z=17`;
msg.body = `data:image/png;base64,${msg.body}|${gmapsUrl}`;
msg.body += `|${
msg.location.description
? msg.location.description
msg.location.options
? msg.location.options
: `${msg.location.latitude}, ${msg.location.longitude}`
}`;
return msg;
Expand Down Expand Up @@ -245,8 +245,8 @@ const verifyMessage = async (
await ticket.update({
lastMessage:
msg.type === "location"
? msg.location.description
? `Localization - ${msg.location.description.split("\\n")[0]}`
? msg.location.options
? `Localization - ${msg.location.options}`
: "Localization"
: msg.body
});
Expand Down

0 comments on commit 5f1076d

Please sign in to comment.