diff --git a/src/browser/app-state.js b/src/browser/app-state.js index 32907c0..9ed75f1 100644 --- a/src/browser/app-state.js +++ b/src/browser/app-state.js @@ -20,6 +20,9 @@ var onSetConnectionState = function(currentState, connectionState){ }; var onAddTeam = function(currentState, team){ + if (!team.name) { + team.name = team.url.replace(/[^:]*:\/\/[^\/]*\/([^/]*)(\/.*|$)/, '$1') + } team.unreadCount = 0; team.mentionCount = 0; team.themeData = defaultThemeData; diff --git a/src/browser/team-button.jsx b/src/browser/team-button.jsx index e828146..45f66ef 100644 --- a/src/browser/team-button.jsx +++ b/src/browser/team-button.jsx @@ -4,7 +4,7 @@ var React = require("react"); var TeamButton = React.createClass({ render: function(){ var team = this.props.team; - var iconText = team.name.substr(0,1); + var iconText = team.name.substr(0,1).toUpperCase(); var isSelected = (team.name === this.props.selectedTeam); var selectedClass = isSelected ? "selected" : "not-selected"; var unreadCount = this.processCount(team.unreadCount);