From 11cc496555728152e4bd172c969f09c317fafa0b Mon Sep 17 00:00:00 2001 From: Mohammed S Date: Tue, 14 Nov 2023 18:45:56 +0530 Subject: [PATCH] fix: bump examples SDK version --- packages/examples/sdk-backend-node/chat/chat.ts | 4 +++- packages/examples/sdk-backend-node/main.ts | 2 +- packages/examples/sdk-backend-node/package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/examples/sdk-backend-node/chat/chat.ts b/packages/examples/sdk-backend-node/chat/chat.ts index 1051a82b8..4c21f5a72 100644 --- a/packages/examples/sdk-backend-node/chat/chat.ts +++ b/packages/examples/sdk-backend-node/chat/chat.ts @@ -72,7 +72,7 @@ const eventlistener = async ( export const runChatClassUseCases = async (): Promise => { const userAlice = await PushAPI.initialize(signer, { env }); - const stream = await userAlice.stream( + const stream = await userAlice.initStream( [CONSTANTS.STREAM.CHAT, CONSTANTS.STREAM.CHAT_OPS], { // stream supports other products as well, such as STREAM.CHAT, STREAM.CHAT_OPS @@ -90,6 +90,8 @@ export const runChatClassUseCases = async (): Promise => { } ); + await stream.connect(); + const userBob = await PushAPI.initialize(secondSigner, { env }); const userKate = await PushAPI.initialize(thirdSigner, { env }); diff --git a/packages/examples/sdk-backend-node/main.ts b/packages/examples/sdk-backend-node/main.ts index e9eeaba8b..e8a538268 100644 --- a/packages/examples/sdk-backend-node/main.ts +++ b/packages/examples/sdk-backend-node/main.ts @@ -17,7 +17,7 @@ const start = async (): Promise => { console.log(`${returnENVLog()}`); await runUserCases(); - //await runNotificationUseCases(); + await runNotificationUseCases(); await runChatUseCases(); await runVideoUseCases(); await runSpaceUseCases(); diff --git a/packages/examples/sdk-backend-node/package.json b/packages/examples/sdk-backend-node/package.json index 772b3586e..dde76c3f2 100644 --- a/packages/examples/sdk-backend-node/package.json +++ b/packages/examples/sdk-backend-node/package.json @@ -11,7 +11,7 @@ "author": "", "license": "ISC", "dependencies": { - "@pushprotocol/restapi": "0.0.1-alpha.53", + "@pushprotocol/restapi": "1.4.35", "@pushprotocol/socket": "^0.5.2" } }