Template.messages.messages = function(){
  return Messages.find({channel: "fakechannel"},{ sort: {time: 1}});
}

Template.input.events = {
  'keydown input#message' : function (event) {
    if (event.which == 13) { // 13 is the enter key event
      var name = 'Anonymous';
      var message = document.getElementById('message');

      if (message.value != '') {
        Messages.insert({
          name: name,
          message: message.value,
          time: Date.now(),
          channel: "fakechannel",
        });

        document.getElementById('message').value = '';
        message.value = '';
      }
    }
  }
}
Template.messages.messages = function(){
  return Messages.find({},{ sort: {time: 1}});
}

Template.input.events = {
  'keydown input#message' : function (event) {
    if (event.which == 13) { // 13 is the enter key event
      var name = 'Anonymous';
      var message = document.getElementById('message');

      if (message.value != '') {
        Messages.insert({
          name: name,
          message: message.value,
          time: Date.now(),
        });

        document.getElementById('message').value = '';
        message.value = '';
      }
    }
  }
}
Revert "hard coding in fake channel"
Revert "hard coding in fake channel"

This reverts commit cac3904dd369f155e2adb055c04740dc4779a934.
