@streamlayer/feature-gamification 0.37.1 → 0.37.3

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.
@@ -209,7 +209,10 @@ export class Gamification extends AbstractFeature {
209
209
  if (this.isInteractiveAllowed) {
210
210
  this.notifications.add({
211
211
  type: NotificationType.QUESTION,
212
- action: () => question.data?.question && this.openQuestion(question.data.question.id),
212
+ action: () => {
213
+ question.data?.question && this.openQuestion(question.data.question.id);
214
+ this.openFeature();
215
+ },
213
216
  close: () => question.data?.question && this.closeQuestion(question.data.question.id),
214
217
  autoHideDuration: 1000 * 60,
215
218
  id: this.background.getCurrentSessionId({
@@ -230,7 +233,7 @@ export class Gamification extends AbstractFeature {
230
233
  const instantView = {
231
234
  heading: question.data.question.notification.title,
232
235
  body: question.data.question.notification.body,
233
- imageMode: question.data.question.notification.imageMode,
236
+ imageMode: question.data.question.appearance?.images,
234
237
  image: optionsValue?.image,
235
238
  video: {
236
239
  id: optionsValue?.video?.id || '',
@@ -244,7 +247,10 @@ export class Gamification extends AbstractFeature {
244
247
  };
245
248
  this.notifications.add({
246
249
  type: NotificationType.QUESTION,
247
- action: () => question.data?.question && this.openQuestion(question.data.question.id),
250
+ action: () => {
251
+ question.data?.question && this.openQuestion(question.data.question.id);
252
+ this.openFeature();
253
+ },
248
254
  close: () => question.data?.question && this.closeQuestion(question.data.question.id),
249
255
  autoHideDuration: 1000 * 120,
250
256
  id: this.background.getCurrentSessionId({ prefix: 'notification', entity: question.data.question.id }),
@@ -266,7 +272,10 @@ export class Gamification extends AbstractFeature {
266
272
  };
267
273
  this.notifications.add({
268
274
  type: NotificationType.QUESTION,
269
- action: () => question.data?.question && this.openQuestion(question.data.question.id),
275
+ action: () => {
276
+ question.data?.question && this.openQuestion(question.data.question.id);
277
+ this.openFeature();
278
+ },
270
279
  close: () => question.data?.question && this.closeQuestion(question.data.question.id),
271
280
  autoHideDuration: 1000 * 120,
272
281
  id: this.background.getCurrentSessionId({ prefix: 'notification', entity: question.data.question.id }),
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@streamlayer/feature-gamification",
3
- "version": "0.37.1",
3
+ "version": "0.37.3",
4
4
  "peerDependencies": {
5
5
  "@bufbuild/protobuf": "^1.6.0",
6
6
  "@fastify/deepmerge": "*",
7
7
  "@streamlayer/sl-eslib": "^5.67.0",
8
8
  "nanostores": "^0.9.5",
9
- "@streamlayer/sdk-web-api": "^0.21.2",
10
- "@streamlayer/sdk-web-core": "^0.20.1",
11
- "@streamlayer/sdk-web-interfaces": "^0.20.4",
12
- "@streamlayer/sdk-web-logger": "^0.5.15",
13
- "@streamlayer/sdk-web-notifications": "^0.13.10",
14
- "@streamlayer/sdk-web-types": "^0.22.2",
15
- "@streamlayer/sdk-web-storage": "^0.4.2"
9
+ "@streamlayer/sdk-web-api": "^0.22.0",
10
+ "@streamlayer/sdk-web-core": "^0.21.1",
11
+ "@streamlayer/sdk-web-interfaces": "^0.20.5",
12
+ "@streamlayer/sdk-web-logger": "^0.5.16",
13
+ "@streamlayer/sdk-web-notifications": "^0.14.1",
14
+ "@streamlayer/sdk-web-storage": "^0.4.3",
15
+ "@streamlayer/sdk-web-types": "^0.22.3"
16
16
  },
17
17
  "devDependencies": {
18
18
  "tslib": "^2.6.2"