Skip to content

Commit

Permalink
Refactor server.ts: Update gettime response format
Browse files Browse the repository at this point in the history
  • Loading branch information
jkyberneees committed Oct 7, 2024
1 parent f6bb487 commit 0928229
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion demos/rpc/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ client.on('session.started', async (info: ConnectionInfo) => {
client.on('secure/inbound.gettime', async (_, reply: ReplyFunction) => {
console.log('Responding to gettime request...')

await reply(new Date().toISOString(), 'ok').waitForAck()
await reply(
{
time: new Date().toISOString(),
},
'ok',
).waitForAck()
})

client.on('secure/inbound.presence', async (message: IncomingMessage) => {
Expand Down

0 comments on commit 0928229

Please sign in to comment.