Skip to content

Commit

Permalink
correct notification when received a vcard - fix #241
Browse files Browse the repository at this point in the history
  • Loading branch information
allgood committed Nov 30, 2024
1 parent 6d50f23 commit a676d1b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion frontend/src/components/NotificationsPopOver/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,10 @@ const NotificationsPopOver = (props) => {
const handleNotifications = (data) => {
const { message, contact, ticket } = data;

const body = message.body.startsWith('{"ticketzvCard"') ? "🪪" : message.body;

const options = {
body: `${message.body} - ${format(new Date(), "HH:mm")}`,
body: `${format(new Date(), "HH:mm")}\n${body}`,
icon: contact.profilePicUrl,
tag: ticket.id,
renotify: true,
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/components/TicketListItem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ const TicketListItem = ({ ticket, groupActionButtons }) => {
color="textSecondary"
>
{ticket.lastMessage ? (
<MarkdownWrapper>{ticket.lastMessage}</MarkdownWrapper>
<MarkdownWrapper>
{
ticket.lastMessage.startsWith('{"ticketzvCard"') ? "🪪" : ticket.lastMessage
}
</MarkdownWrapper>
) : (
<br />
)}
Expand Down

0 comments on commit a676d1b

Please sign in to comment.