Use immer
This commit is contained in:
parent
7f755d2a83
commit
4f72e164d7
33 changed files with 1236 additions and 1153 deletions
|
@ -79,13 +79,13 @@ export default createCommandMiddleware(COMMAND, {
|
|||
topic({ dispatch, getState, server, channel }, ...newTopic) {
|
||||
if (newTopic.length > 0) {
|
||||
dispatch(setTopic(newTopic.join(' '), channel, server));
|
||||
} else {
|
||||
const topic = getState().channels.getIn([server, channel, 'topic']);
|
||||
} else if (channel) {
|
||||
const { topic } = getState().channels[server][channel];
|
||||
if (topic) {
|
||||
return text(topic);
|
||||
}
|
||||
return 'No topic set';
|
||||
}
|
||||
return 'No topic set';
|
||||
},
|
||||
|
||||
msg({ dispatch, server }, target, ...message) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue