canmove, Confirmed users, Bureaucrats and Sysops emeriti
3,628
edits
Line 182: | Line 182: | ||
==== Text Messages ==== | ==== Text Messages ==== | ||
''This API only applies when the SPA advertises "nodatachannel" in its capabilities'' | ''This part of the API only applies when the SPA advertises "nodatachannel" in its capabilities'' | ||
===== Sending a text message ===== | |||
This message can be sent either way. | This message can be sent either way. | ||
{topic: "chat:message", | {topic: "message", {peer: <peer>, type: "chat:message", message: {username: <peer>, message: <string>, date: <date>}} | ||
* Peer is the peer the message is being sent to | |||
* username is the user the peer was from | |||
===== Typing notifications ===== | |||
{topic: "message", {peer: <peer>, type: "chat:typing", message: {username: <peer>}} | |||
* Peer is the peer the message is being sent to | |||
* username is the user the peer was from | |||
=== Handling ICE Candidates === | === Handling ICE Candidates === |