Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update to parser API v3 #387

Merged
merged 5 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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