chat/static/js/app.js
// create a message via API post
create a message via API post
create a message via API post
function sendMessage(recipient, room_name, body, broadcast=0) {
    console.log("sendMessage / broadcast " + broadcast);
    $.post('/api/v1/message/', {
        recipient: recipient,
        room: room_name,
        body: body,
        broadcast: broadcast
    }).fail(function () {
        alert('Error! Check console!');
    });
}
function sendMessage ( recipient , room_name , body , broadcast = 0 ) { console . log ( "sendMessage / broadcast " + broadcast ) ; $ . post ( '/api/v1/message/' , { recipient : recipient , room : room_name , body : body , broadcast : broadcast } ) . fail ( function ( ) { alert ( 'Error! Check console!' ) ; } ) ; }
create a message via API post
create a message via API post