function history() {
  n =
    config["history_length"] === null
      ? Math.min(process.stdout.rows, 100)
      : config["history_length"];
  channel
    .fetchMessages({
      limit: n
    })
    .then(m => {
      messages = m.array().reverse();
      update();
    });
}
// Fill messages array with messages from channel and show them with `update()`
Fill messages array with messages from channel and show them with `update()`
Fill messages array with messages from channel and show them with ` update () `
function history() {
  n =
    config["history_length"] === null
      ? Math.min(process.stdout.rows, 100)
      : config["history_length"];
  channel
    .fetchMessages({
      limit: n
    })
    .then(m => {
      messages = m.array().reverse();
      update();
    });
}
function history ( ) { n = config [ "history_length" ] === null ? Math . min ( process . stdout . rows , 100 ) : config [ "history_length" ] ; channel . fetchMessages ( { limit : n } ) . then ( m => { messages = m . array ( ) . reverse ( ) ; update ( ) ; } ) ; }
Fill messages array with messages from channel and show them with `update()`
Fill messages array with messages from channel and show them with ` update () `