<commit_before>LeftSidebar = BlazeComponent.extendComponent({
  channels: function () {
    return Channels.find( { teamId: currentTeamId() } );
  },
  allUsersExceptMe: function () {
    // TODO: add limit, autoscale to sidebar height
    return Meteor.users.find({ _id: { $ne: Meteor.userId() } });
  },
  userStatusLabel: function () {
    var parent = this.currentData();
    var statusLabel = parent.status.online ? 'online' : parent.status.idle ? 'idle' : 'offline';
    return statusLabel;
  },
  currentUserAvatar: function () {
    var user = Meteor.user();
    if (user && user.emails) {
      return Gravatar.imageUrl(user.emails[0].address);
    }
  },
  activeChannelClass: function () {
    return currentChannelId() == this.currentData()._id ? 'active' : '';
  },
  events: function() {
    return [
      {
        'click .sign-out': function(event) {
          event.preventDefault();

          Meteor.logout();
          FlowRouter.go('home');
        },

        'click .left-sidebar-user-show-dropdown': function(event) {
          event.preventDefault();
<commit_msg>Redirect in the logout callback<commit_after>LeftSidebar = BlazeComponent.extendComponent({
  channels: function () {
    return Channels.find( { teamId: currentTeamId() } );
  },
  allUsersExceptMe: function () {
    // TODO: add limit, autoscale to sidebar height
    return Meteor.users.find({ _id: { $ne: Meteor.userId() } });
  },
  userStatusLabel: function () {
    var parent = this.currentData();
    var statusLabel = parent.status.online ? 'online' : parent.status.idle ? 'idle' : 'offline';
    return statusLabel;
  },
  currentUserAvatar: function () {
    var user = Meteor.user();
    if (user && user.emails) {
      return Gravatar.imageUrl(user.emails[0].address);
    }
  },
  activeChannelClass: function () {
    return currentChannelId() == this.currentData()._id ? 'active' : '';
  },
  events: function() {
    return [
      {
        'click .sign-out': function(event) {
          event.preventDefault();

          Meteor.logout(function (err) {
            if (!err) {
              FlowRouter.go('home');
            }
          });
        },

        'click .left-sidebar-user-show-dropdown': function(event) {
          event.preventDefault();

{'fraction_non_alphanumeric': 0.15136804942630186, 'fraction_numerical': 0.00088261253309797, 'mean_word_length': 2.692182410423453, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4140274', 'n_tokens_mistral': 694, 'n_tokens_neox': 685, 'n_words': 137}