@streamlayer/feature-gamification 0.27.1 → 0.28.0

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.
package/lib/detail.js CHANGED
@@ -25,6 +25,9 @@ export const detail = (transport, $openedQuestionId, $feedList) => {
25
25
  if (feedList.data) {
26
26
  return feedList.data.find((item) => item.id === openedQuestion);
27
27
  }
28
+ else {
29
+ console.error('Feed list is not loaded yet. Issue with the opened question.');
30
+ }
28
31
  }
29
32
  return undefined;
30
33
  });
@@ -192,6 +192,7 @@ export class Gamification extends AbstractFeature {
192
192
  correctAnswerTitle: correctAnswer?.text,
193
193
  correct: correctAnswer?.youVoted,
194
194
  predictionResult: status === QuestionStatus.RESOLVED,
195
+ questionTitle: question?.subject,
195
196
  },
196
197
  },
197
198
  });
package/lib/onboarding.js CHANGED
@@ -33,6 +33,7 @@ export const onboarding = (service, background, transport, notifications) => {
33
33
  close: () => {
34
34
  notifications.markAsViewed(notificationId);
35
35
  },
36
+ delay: 1000,
36
37
  autoHideDuration: 1000000,
37
38
  data: {
38
39
  questionType: QuestionType.UNSET,
@@ -113,6 +114,8 @@ export const onboarding = (service, background, transport, notifications) => {
113
114
  userId: background.userId.get() || '',
114
115
  eventId,
115
116
  }, OnboardingStatus.Completed);
117
+ const notificationId = background.getCurrentSessionId({ prefix: 'onboarding' });
118
+ notifications.close(notificationId);
116
119
  }
117
120
  };
118
121
  return { $store, submitInplay };
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@streamlayer/feature-gamification",
3
- "version": "0.27.1",
3
+ "version": "0.28.0",
4
4
  "peerDependencies": {
5
5
  "@bufbuild/protobuf": "^1.4.2",
6
6
  "@streamlayer/sl-eslib": "^5.53.6",
7
7
  "@fastify/deepmerge": "*",
8
8
  "nanostores": "^0.9.5",
9
9
  "@streamlayer/sdk-web-api": "^0.1.0",
10
- "@streamlayer/sdk-web-core": "^0.0.5",
10
+ "@streamlayer/sdk-web-core": "^0.0.6",
11
11
  "@streamlayer/sdk-web-interfaces": "^0.0.1",
12
12
  "@streamlayer/sdk-web-logger": "^0.0.1",
13
- "@streamlayer/sdk-web-notifications": "^0.13.4",
13
+ "@streamlayer/sdk-web-notifications": "^0.1.0",
14
14
  "@streamlayer/sdk-web-storage": "^0.0.4",
15
15
  "@streamlayer/sdk-web-types": "^0.0.1"
16
16
  },