tiktok-live-connector
Advanced tools
Comparing version 0.9.16 to 0.9.17
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -14,8 +14,2 @@ "use strict"; | ||
if (webcastObject.giftJson) { | ||
webcastObject.gift = JSON.parse(webcastObject.giftJson); | ||
webcastObject.giftId = webcastObject.gift.gift_id; | ||
delete webcastObject.giftJson; | ||
} | ||
if (webcastObject.event) { | ||
@@ -61,2 +55,14 @@ Object.assign(webcastObject, webcastObject.event); | ||
if (webcastObject.giftId) { | ||
// Convert to boolean | ||
webcastObject.repeatEnd = !!webcastObject.repeatEnd; // Add previously used JSON structure (for compatibility reasons) | ||
// Can be removed soon | ||
webcastObject.gift = { | ||
gift_id: webcastObject.giftId, | ||
repeat_count: webcastObject.repeatCount, | ||
repeat_end: webcastObject.repeatEnd ? 1 : 0 | ||
}; | ||
} | ||
return Object.assign({}, webcastObject); | ||
@@ -63,0 +69,0 @@ } |
{ | ||
"name": "tiktok-live-connector", | ||
"version": "0.9.16", | ||
"version": "0.9.17", | ||
"description": "Node.js module to receive live stream chat events like comments and gifts from TikTok LIVE", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
63607
862