heroiclabs / nakama-js

JavaScript client for Nakama server written in TypeScript.
https://heroiclabs.com/docs/nakama/client-libraries/javascript/
Apache License 2.0
182 stars 54 forks source link

Fix documentation to send a chat #185

Closed f4th4n closed 4 months ago

f4th4n commented 4 months ago

See the function signature below:

joinChat(target: string, type: number, persistence: boolean, hidden: boolean): Promise<Channel>;

Currently socket.joinChat() example is not used correctly. The first argument should be target, then type. Also, the function will return Promise of Channel object (Promise<Channel>) therefore I changed from channel.channel.id to channel.id.

Tested on Chrome Version 122.0.6261.69

CLAassistant commented 4 months ago

CLA assistant check
All committers have signed the CLA.

f4th4n commented 4 months ago

@lugehorsam you're welcome. I've signed the licence agreement btw.