@streamlayer/feature-gamification 0.35.0 → 0.35.1

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.
@@ -131,7 +131,7 @@ export class Gamification extends AbstractFeature {
131
131
  type: NotificationType.QUESTION_RESOLVED,
132
132
  action: () => this.openQuestion(id),
133
133
  close: () => this.closeQuestion(id),
134
- autoHideDuration: 35000,
134
+ autoHideDuration: correctAnswer?.youVoted ? 15000 : 12000,
135
135
  id: notificationId,
136
136
  data: {
137
137
  questionType: QuestionType.PREDICTION,
@@ -230,7 +230,7 @@ export class Gamification extends AbstractFeature {
230
230
  const instantView = {
231
231
  heading: question.data.question.notification.title,
232
232
  body: question.data.question.notification.body,
233
- image: optionsValue.image,
233
+ image: optionsValue?.image,
234
234
  video: {
235
235
  id: optionsValue?.video?.id || '',
236
236
  url: optionsValue?.video?.url || '',
@@ -256,9 +256,9 @@ export class Gamification extends AbstractFeature {
256
256
  else if (question.data.question.type === QuestionType.TWEET) {
257
257
  const optionsValue = question.data.question.options?.options.value;
258
258
  const tweetView = {
259
- title: question.data.question.notification.title,
260
- body: question.data.question.notification.body,
261
- image: question.data.question.notification.image,
259
+ title: question.data.question.notification?.title,
260
+ body: question.data.question.notification?.body,
261
+ image: question.data.question.notification?.image,
262
262
  account: optionsValue?.tweetMeta?.account || '',
263
263
  accountVerified: !!optionsValue?.tweetMeta?.accountVerified,
264
264
  };
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@streamlayer/feature-gamification",
3
- "version": "0.35.0",
3
+ "version": "0.35.1",
4
4
  "peerDependencies": {
5
5
  "@bufbuild/protobuf": "^1.6.0",
6
6
  "@fastify/deepmerge": "*",
7
- "@streamlayer/sl-eslib": "^5.63.3",
7
+ "@streamlayer/sl-eslib": "^5.64.1",
8
8
  "nanostores": "^0.9.5",
9
- "@streamlayer/sdk-web-api": "^0.20.0",
10
- "@streamlayer/sdk-web-core": "^0.18.1",
11
- "@streamlayer/sdk-web-interfaces": "^0.20.0",
12
- "@streamlayer/sdk-web-logger": "^0.5.11",
13
- "@streamlayer/sdk-web-notifications": "^0.13.6",
14
- "@streamlayer/sdk-web-storage": "^0.3.11",
15
- "@streamlayer/sdk-web-types": "^0.21.0"
9
+ "@streamlayer/sdk-web-api": "^0.20.1",
10
+ "@streamlayer/sdk-web-core": "^0.18.2",
11
+ "@streamlayer/sdk-web-interfaces": "^0.20.1",
12
+ "@streamlayer/sdk-web-logger": "^0.5.12",
13
+ "@streamlayer/sdk-web-notifications": "^0.13.7",
14
+ "@streamlayer/sdk-web-storage": "^0.3.12",
15
+ "@streamlayer/sdk-web-types": "^0.21.1"
16
16
  },
17
17
  "devDependencies": {
18
18
  "tslib": "^2.6.2"