Add messages sent to channels with dots in the name to the correct tab

This commit is contained in:
Ken-Håvard Lieng 2017-06-23 02:27:56 +02:00
parent 60cc5ca139
commit 54462b8a1b
2 changed files with 21 additions and 21 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
import { List, Map, Record } from 'immutable'; import { List, Map, Record } from 'immutable';
import { createSelector } from 'reselect'; import { createSelector } from 'reselect';
import { findBreakpoints, messageHeight, linkify, timestamp } from 'util'; import { findBreakpoints, messageHeight, linkify, timestamp, isChannel } from 'util';
import createReducer from 'util/createReducer'; import createReducer from 'util/createReducer';
import { getApp } from './app'; import { getApp } from './app';
import { getSelectedTab } from './tab'; import { getSelectedTab } from './tab';
@ -118,7 +118,7 @@ function initMessage(message, tab, state) {
} }
function getMessageTab(server, to) { function getMessageTab(server, to) {
if (!to || to.indexOf('.') !== -1 || to === '*') { if (!to || to === '*' || (!isChannel(to) && to.indexOf('.') !== -1)) {
return server; return server;
} }
return to; return to;