@streamlayer/feature-gamification 1.16.0 → 1.16.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.
- package/lib/gamification.js +12 -1
- package/package.json +8 -8
package/lib/gamification.js
CHANGED
|
@@ -344,7 +344,18 @@ export class Gamification extends AbstractFeature {
|
|
|
344
344
|
this.background.feedSubscription.removeListener('feed-subscription-questions-list');
|
|
345
345
|
};
|
|
346
346
|
betPackVote = async (questionId, answerId) => {
|
|
347
|
-
|
|
347
|
+
try {
|
|
348
|
+
await actions.submitAnswer(this.transport, { questionId, answerId });
|
|
349
|
+
}
|
|
350
|
+
catch (error) {
|
|
351
|
+
if (error.message === ERROR.ALREADY_VOTED) {
|
|
352
|
+
const data = $questionByUser(questionId, this.transport);
|
|
353
|
+
const cancel = data.subscribe(() => { });
|
|
354
|
+
data.invalidate();
|
|
355
|
+
cancel();
|
|
356
|
+
}
|
|
357
|
+
throw error;
|
|
358
|
+
}
|
|
348
359
|
const betPackList = { ...this.betPack.getValues().data };
|
|
349
360
|
const question = betPackList?.[questionId];
|
|
350
361
|
if (question) {
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/feature-gamification",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@bufbuild/protobuf": "^1.10.0",
|
|
6
6
|
"@fastify/deepmerge": "^2.0.0",
|
|
7
7
|
"@streamlayer/sl-eslib": "^5.149.1",
|
|
8
8
|
"uuid": "^11.1.0",
|
|
9
9
|
"nanostores": "^0.11.4",
|
|
10
|
-
"@streamlayer/sdk-web-api": "^1.8.
|
|
11
|
-
"@streamlayer/sdk-web-
|
|
12
|
-
"@streamlayer/sdk-web-
|
|
13
|
-
"@streamlayer/sdk-web-
|
|
14
|
-
"@streamlayer/sdk-web-notifications": "^1.3.
|
|
15
|
-
"@streamlayer/sdk-web-storage": "^1.0.
|
|
16
|
-
"@streamlayer/sdk-web-types": "^1.10.
|
|
10
|
+
"@streamlayer/sdk-web-api": "^1.8.1",
|
|
11
|
+
"@streamlayer/sdk-web-interfaces": "^1.4.14",
|
|
12
|
+
"@streamlayer/sdk-web-logger": "^1.0.48",
|
|
13
|
+
"@streamlayer/sdk-web-core": "^1.11.3",
|
|
14
|
+
"@streamlayer/sdk-web-notifications": "^1.3.10",
|
|
15
|
+
"@streamlayer/sdk-web-storage": "^1.0.48",
|
|
16
|
+
"@streamlayer/sdk-web-types": "^1.10.5"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"tslib": "^2.7.0"
|