site/public/semantic/javascript/semantic.js
function(response) {
            message      = response.data;
            users        = $module.data('users');
            loggedInUser = $module.data('user');
            if(users[ message.userID] !== undefined) {
              // logged in user's messages already pushed instantly
              if(loggedInUser === undefined || loggedInUser.id != message.userID) {
                message.user = users[ message.userID ];
                module.message.display(message);
              }
            }
          }
function(response) {
            message      = response.data;
            users        = $module.data('users');
            loggedInUser = $module.data('user');
            if(users[ message.userID] !== undefined) {
              // logged in user's messages already pushed instantly
              if(loggedInUser === undefined || loggedInUser.id != message.userID) {
                message.user = users[ message.userID ];
                module.message.display(message);
              }
            }
          }
function ( response ) { message = response . data ; users = $module . data ( 'users' ) ; loggedInUser = $module . data ( 'user' ) ; if ( users [ message . userID ] !== undefined ) { // logged in user's messages already pushed instantly if ( loggedInUser === undefined || loggedInUser . id != message . userID ) { message . user = users [ message . userID ] ; module . message . display ( message ) ; } } }
receives chat response and processes
receives chat response and processes