@stream-io/node-sdk 0.2.3 → 0.2.4
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/dist/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +3 -3
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/StreamClient.ts +4 -4
package/dist/index.cjs.js
CHANGED
|
@@ -8745,7 +8745,7 @@ class StreamClient {
|
|
|
8745
8745
|
? 'https://chat.stream-io-api.com'
|
|
8746
8746
|
: 'https://video.stream-io-api.com'),
|
|
8747
8747
|
headers: {
|
|
8748
|
-
'X-Stream-Client': 'stream-node-' + "0.2.
|
|
8748
|
+
'X-Stream-Client': 'stream-node-' + "0.2.4",
|
|
8749
8749
|
},
|
|
8750
8750
|
middleware: [
|
|
8751
8751
|
{
|
|
@@ -8872,7 +8872,7 @@ class StreamClient {
|
|
|
8872
8872
|
* @param call_cids this parameter is deprecated use `createCallToken` for call tokens
|
|
8873
8873
|
* @returns
|
|
8874
8874
|
*/
|
|
8875
|
-
createToken(userID, exp = Math.round(
|
|
8875
|
+
createToken(userID, exp = Math.round(Date.now() / 1000) + 60 * 60, iat = Math.floor((Date.now() - 1000) / 1000), call_cids) {
|
|
8876
8876
|
const payload = {
|
|
8877
8877
|
user_id: userID,
|
|
8878
8878
|
exp,
|
|
@@ -8892,7 +8892,7 @@ class StreamClient {
|
|
|
8892
8892
|
* @param iat this is deprecated, the current date will be set internally
|
|
8893
8893
|
* @returns
|
|
8894
8894
|
*/
|
|
8895
|
-
createCallToken(userIdOrObject, call_cids, exp = Math.round(
|
|
8895
|
+
createCallToken(userIdOrObject, call_cids, exp = Math.round(Date.now() / 1000) + 60 * 60, iat = Math.floor((Date.now() - 1000) / 1000)) {
|
|
8896
8896
|
const payload = {
|
|
8897
8897
|
exp,
|
|
8898
8898
|
iat,
|