Created
May 12, 2020 14:54
-
-
Save dongido001/85b9619e3ee9bd59f0559eaf9fc8322b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// [...] | |
client = new StreamChat("<STREAM_API_KEY>") | |
async function initializeClient() { | |
const token = await generateToken(username) | |
client.setUser({ | |
id: username, | |
name: "Jon Snow", // Update this name dynamically | |
image: "https://bit.ly/2u9Vc0r", | |
}, token); // token generated from our Node server | |
// More code comming | |
return client | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment