@streamlayer/feature-gamification
Advanced tools
Comparing version 0.25.0 to 0.26.0
@@ -122,2 +122,29 @@ import { AbstractFeature, ApiStore, FeatureStatus, SingleStore, createSingleStore, } from '@streamlayer/sdk-web-interfaces'; | ||
} | ||
else if (question.data.question.type === QuestionType.TWEET) { | ||
const optionsValue = question.data.question.options?.options.value; | ||
const tweetView = { | ||
title: question.data.question.notification.title, | ||
body: question.data.question.notification.body, | ||
image: question.data.question.notification.image, | ||
account: { | ||
// ToDo: add later | ||
image: '', | ||
name: optionsValue?.tweetMeta?.account || '', | ||
// ToDo: add later | ||
userName: '', | ||
verified: !!optionsValue?.tweetMeta?.accountVerified, | ||
}, | ||
}; | ||
this.notifications.add({ | ||
type: NotificationType.QUESTION, | ||
action: () => question.data?.question && this.openQuestion(question.data.question.id), | ||
close: () => question.data?.question && this.closeQuestion(question.data.question.id), | ||
autoHideDuration: 1000 * +(question.data.question?.appearance?.autoHideInterval || '5'), | ||
id: this.background.getCurrentSessionId({ prefix: 'notification', entity: question.data.question.id }), | ||
data: { | ||
questionType: question.data.question.type, | ||
tweet: tweetView, | ||
}, | ||
}); | ||
} | ||
} | ||
@@ -124,0 +151,0 @@ } |
{ | ||
"name": "@streamlayer/feature-gamification", | ||
"version": "0.25.0", | ||
"version": "0.26.0", | ||
"peerDependencies": { | ||
@@ -13,3 +13,3 @@ "@bufbuild/protobuf": "^1.4.2", | ||
"@streamlayer/sdk-web-logger": "^0.0.4", | ||
"@streamlayer/sdk-web-notifications": "^0.12.1", | ||
"@streamlayer/sdk-web-notifications": "^0.13.0", | ||
"@streamlayer/sdk-web-storage": "^0.0.4", | ||
@@ -16,0 +16,0 @@ "@streamlayer/sdk-web-types": "^0.20.1" |
79860
1458