Fix handling of PART messages with no reason

This commit is contained in:
Ken-Håvard Lieng 2017-04-04 22:57:01 +02:00
parent 52f929ec45
commit 50dc0ef64f
6 changed files with 56 additions and 41 deletions

View file

@ -85,8 +85,7 @@ export default createReducer(Map(), {
},
[actions.SOCKET_PART](state, action) {
const { server, channels, user } = action;
const channel = channels[0];
const { server, channel, user } = action;
if (state.hasIn([server, channel])) {
return state.updateIn([server, channel, 'users'], users =>
users.filter(u => u.nick !== user)