752 B
752 B
vybe websocket protocol - sent by client
socket.io actions + expected msg format and other info
all responses have same type as original message
if a message fails, you get a response with the following format:
{
"success": false,
"message": "Something broke"
}
create_user
Message format:
{
"name": "unique_username",
"pubkey": "your PGP public key"
}
Response format:
{
"success": true,
"id": 123
}
get_history
todo
send_message
Message format:
{
"name": "unique_username",
"message": "signed message"
}
Response format:
{
"success": true
}
sent by server
new_message
{
"name": "unique_username",
"message": "msg text"
}