qiscus-sdk-core 2.16.2 → 2.16.3
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/index.js
CHANGED
|
@@ -39,7 +39,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
39
39
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
|
-
const
|
|
42
|
+
const nonSecure = require("nanoid/non-secure");
|
|
43
43
|
const request = require("superagent");
|
|
44
44
|
const mitt = require("mitt");
|
|
45
45
|
const is = require("./lib/is.js");
|
|
@@ -1373,7 +1373,7 @@ const _QiscusSDK = class _QiscusSDK {
|
|
|
1373
1373
|
}
|
|
1374
1374
|
prepareCommentToBeSubmitted(comment) {
|
|
1375
1375
|
let commentToBeSubmitted = new Comment(comment);
|
|
1376
|
-
let uniqueId = `javascript-${
|
|
1376
|
+
let uniqueId = `javascript-${nonSecure.nanoid()}`;
|
|
1377
1377
|
if (comment.unique_id) uniqueId = comment.unique_id;
|
|
1378
1378
|
commentToBeSubmitted.attachUniqueId(uniqueId);
|
|
1379
1379
|
commentToBeSubmitted.markAsPending();
|
|
@@ -1877,7 +1877,7 @@ const _QiscusSDK = class _QiscusSDK {
|
|
|
1877
1877
|
});
|
|
1878
1878
|
}
|
|
1879
1879
|
_generateUniqueId() {
|
|
1880
|
-
return `javascript-${
|
|
1880
|
+
return `javascript-${nonSecure.nanoid()}`;
|
|
1881
1881
|
}
|
|
1882
1882
|
generateMessage({ roomId, text, extras }) {
|
|
1883
1883
|
const id = Date.now();
|