mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Fix calling wrong method in README for ws (#26631)
The documentation is wrong. The WebSocketClient.authorize() is not a method of WebSocketClient. The right method is WebSocketClient.initialize()
This commit is contained in:
parent
02e23a3275
commit
b4b760274d
@ -76,7 +76,7 @@ const connectionUrl = 'https://mymattermostserver.example.com/api/v4/websocket';
|
|||||||
const authToken = process.env.TOKEN;
|
const authToken = process.env.TOKEN;
|
||||||
|
|
||||||
const wsClient = new WebSocketClient();
|
const wsClient = new WebSocketClient();
|
||||||
wsClient.authorize(connectionUrl, authToken);
|
wsClient.initialize(connectionUrl, authToken);
|
||||||
|
|
||||||
wsClient.addMessageListener((msg) => {
|
wsClient.addMessageListener((msg) => {
|
||||||
if (msg.event === 'posted') {
|
if (msg.event === 'posted') {
|
||||||
|
Loading…
Reference in New Issue
Block a user