Skip to content
This repository has been archived by the owner on Mar 30, 2021. It is now read-only.
/ esn-chat-client Public archive

[ARCHIVED] 🐱 Websocket client for linagora.esn.chat module

Notifications You must be signed in to change notification settings

linagora/esn-chat-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Archived

esn-chat-client

Client library for linagora.esn.chat module.

Install

npm install @linagora/esn-chat-client

Usage

const WebsocketClient = require('@linagora/esn-chat-client').WebsocketClient;

const client = new WebsocketClient({token, url, userId}));

client.on('message', message => {
  console.log('Got a message on channel', message);
});

client.connect();

or if you do not have your token or userId

const factory = require('@linagora/esn-chat-client').factory;

factory.get({url, username, password}).then(client => {
  client.on('message', message => {
    console.log('Got a message on channel', message);
  });

  client.connect();
});

About

[ARCHIVED] 🐱 Websocket client for linagora.esn.chat module

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published