docs: function setupDialogInfoPopup(currentDialog, name) {
      var occupantsIds = currentDialog.occupants_ids;
  
      console.log(occupantsIds);
  
      console.log("info");
  
      // clear old list
      $('#add_new_occupant').empty();
      // show name
      $('#dialog-name-input').val(name);
  
      $('#all_occupants').text('');
  
      if (occupantsIds.length > 0) {
          $('#all_occupants').append('<b>Occupants: </b>');
  
          // show occupants
          occupantsIds.forEach(function(uid, index) {
              var login = getUserLoginById(uid);
  
              $('#all_occupants').append("<span>" + login + "</span>");
  
              // owner - provide an ability to kick user, but do not show this button for himself
              if(currentDialog.user_id == currentUser.id && currentUser.id != uid && currentDialog.type != 3){
                $('#all_occupants').append("<a href='#' id='kick-user-" + uid + "'><span class='glyphicon glyphicon-remove-circle'></span></a>");
                $("#kick-user-" + uid).on('click', kickUser);
              }
  
              if (index + 1 != occupantsIds.length) {
                  $('#all_occupants').append(", ");
              }
          });
      }
  
      var $elements = $('.new-info, .push, #push_usersList, #update_dialog_button');
  
      // show type
      //
      // private
      if (currentDialog.type == 3) {
          $('.dialog-type-info').text('').append('<b>Dialog type: </b>private chat');
          $elements.hide();
      // group
      } else {
          $('.dialog-type-info').text('').append('<b>Dialog type: </b>group chat');
          $elements.show();
  
          // get users to add to dialog
          fillUsersList();
      }
  }