Skip to content

Commit

Permalink
v14.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
boehlerlukas committed Oct 3, 2024
1 parent cf36bd1 commit 4558906
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build/cjs/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/esm/index.mjs

Large diffs are not rendered by default.

Binary file modified demo/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion demo/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Gleap.setFrameUrl("http://0.0.0.0:3001");
Gleap.setApiUrl("http://0.0.0.0:9000");
Gleap.setWSApiUrl("ws://0.0.0.0:9000");

Gleap.initialize("ogWhNhuiZcGWrva5nlDS8l7a78OfaLlV");
Gleap.initialize("gbMLfLgtayFd2PeNJrjbxl6eB2OboAfn");
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gleap",
"version": "14.0.2",
"version": "14.0.3",
"main": "build/cjs/index.js",
"module": "build/esm/index.mjs",
"exports": {
Expand Down
1 change: 1 addition & 0 deletions published/14.0.3/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion published/latest/index.js

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions src/Gleap.js
Original file line number Diff line number Diff line change
Expand Up @@ -1102,10 +1102,15 @@ class Gleap {
performActions(actions) {
for (let i = 0; i < actions.length; i++) {
const action = actions[i];

if (action && action.actionType) {
if (action.actionType === "notification") {
if (!this.disableInAppNotifications) {
Gleap.showNotification(action);
if (action?.data?.checklist?.popupType === "widget") {
Gleap.openChecklist(action.data.checklist.id, true);
} else {
if (!this.disableInAppNotifications) {
Gleap.showNotification(action);
}
}
} else if (action.actionType === "banner") {
Gleap.showBanner(action);
Expand Down
6 changes: 3 additions & 3 deletions src/GleapNotificationManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ export default class GleapNotificationManager {
const elem = document.createElement("div");
elem.onclick = () => {
if (notification.data.conversation) {
Gleap.openConversation(notification.data.conversation.shareToken);
Gleap.openConversation(notification.data.conversation.shareToken, true);
} else if (notification.data.news) {
Gleap.openNewsArticle(notification.data.news.id);
Gleap.openNewsArticle(notification.data.news.id, true);
} else if (notification.data.checklist) {
Gleap.openChecklist(notification.data.checklist.id);
Gleap.openChecklist(notification.data.checklist.id, true);
} else {
Gleap.open();
}
Expand Down

0 comments on commit 4558906

Please sign in to comment.