@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.es.js
CHANGED
|
@@ -8743,7 +8743,7 @@ class StreamClient {
|
|
|
8743
8743
|
? 'https://chat.stream-io-api.com'
|
|
8744
8744
|
: 'https://video.stream-io-api.com'),
|
|
8745
8745
|
headers: {
|
|
8746
|
-
'X-Stream-Client': 'stream-node-' + "0.2.
|
|
8746
|
+
'X-Stream-Client': 'stream-node-' + "0.2.4",
|
|
8747
8747
|
},
|
|
8748
8748
|
middleware: [
|
|
8749
8749
|
{
|
|
@@ -8870,7 +8870,7 @@ class StreamClient {
|
|
|
8870
8870
|
* @param call_cids this parameter is deprecated use `createCallToken` for call tokens
|
|
8871
8871
|
* @returns
|
|
8872
8872
|
*/
|
|
8873
|
-
createToken(userID, exp = Math.round(
|
|
8873
|
+
createToken(userID, exp = Math.round(Date.now() / 1000) + 60 * 60, iat = Math.floor((Date.now() - 1000) / 1000), call_cids) {
|
|
8874
8874
|
const payload = {
|
|
8875
8875
|
user_id: userID,
|
|
8876
8876
|
exp,
|
|
@@ -8890,7 +8890,7 @@ class StreamClient {
|
|
|
8890
8890
|
* @param iat this is deprecated, the current date will be set internally
|
|
8891
8891
|
* @returns
|
|
8892
8892
|
*/
|
|
8893
|
-
createCallToken(userIdOrObject, call_cids, exp = Math.round(
|
|
8893
|
+
createCallToken(userIdOrObject, call_cids, exp = Math.round(Date.now() / 1000) + 60 * 60, iat = Math.floor((Date.now() - 1000) / 1000)) {
|
|
8894
8894
|
const payload = {
|
|
8895
8895
|
exp,
|
|
8896
8896
|
iat,
|