@whiplashmerch/whiplash-api-client 0.4.137 → 0.4.138

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25273,12 +25273,14 @@ function getBroadcastFromPusherResponse({ event, message }) {
25273
25273
  && broadcast.title
25274
25274
  && broadcast.body
25275
25275
  && broadcast.id) {
25276
- switch (broadcast.display_status) {
25277
- case 'error':
25278
- broadcast.variant = 'danger';
25279
- break;
25280
- default:
25281
- broadcast.variant = broadcast.display_status;
25276
+ if (broadcast.level === 2) {
25277
+ broadcast.variant = 'danger';
25278
+ }
25279
+ else if (broadcast.level === 1) {
25280
+ broadcast.variant = 'info';
25281
+ }
25282
+ else {
25283
+ broadcast.variant = broadcast.display_status === 'error' ? 'danger' : broadcast.display_status;
25282
25284
  }
25283
25285
  broadcast.event = event;
25284
25286
  return broadcast;