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

@ -45,8 +45,8 @@ export default function handleSocket(socket, { dispatch, getState }) {
dispatch(inform(`${user} joined the channel`, server, channels[0]))
);
socket.on('part', ({ user, server, channels, reason }) =>
dispatch(inform(withReason(`${user} left the channel`, reason), server, channels[0]))
socket.on('part', ({ user, server, channel, reason }) =>
dispatch(inform(withReason(`${user} left the channel`, reason), server, channel))
);
socket.on('quit', ({ user, server, reason, channels }) =>