Skip to content

Commit

Permalink
feat: update to parser API v3 (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni authored Nov 29, 2023
1 parent 215836d commit 2b520a2
Show file tree
Hide file tree
Showing 7 changed files with 888 additions and 754 deletions.
5 changes: 2 additions & 3 deletions components/Message.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ export function Message({ message }) { // NOSONAR
return null;
}

// check typeof as fallback for older version than `2.4.0`
const messageId = typeof message.messageId === 'function' && message.messageId();
const messageId = message.id();
const headers = message.headers();
const payload = message.payload();
const correlationId = message.correlationId();
Expand All @@ -26,7 +25,7 @@ export function Message({ message }) { // NOSONAR
if (message.title()) {
header += ` ${message.title()}`;
}
const id = message.messageId() || message.name() || message.id();
const id = message.name() || messageId;
if (id) {
header += ` \`${id}\``;
}
Expand Down
Loading

0 comments on commit 2b520a2

Please sign in to comment.