janus-method-message

0.0.4 • Public • Published

janus-method-chat

Replaces built-in 'chat' method, adds private communication.

What it does:

Enables chatting, including sending a private message from one user to another.

Configuration options:

None

Syntax:

Send 'Hello' to everyone:

{"method": "chat", "data": {"message": "Hi"}}

Everyone in room receives:

{"method":"user_chat", "data":{"roomId":"69de79e1077103cb59d1a890e96c7ef2","userId":"Alice", "message":"Hello"}}

Send 'Hi' to user 'Bob':

{"method": "chat", "data": {"toUserId": "Bob", "message": "Hi"}}

'Bob' receives:

{"method": "user_chat", "data": {"userId": "Alice", "toUserId": "Bob", "message": "Hi"}}

Readme

Keywords

Package Sidebar

Install

npm i janus-method-message

Weekly Downloads

1

Version

0.0.4

License

LGPL 2.1

Last publish

Collaborators

  • timschwartz