Handle TOPIC in State.handleMessage

This commit is contained in:
Simon Ser 2021-06-04 18:57:02 +02:00
parent 30a345298f
commit 04362644bf
2 changed files with 4 additions and 3 deletions

View File

@ -636,9 +636,6 @@ export default class App extends Component {
break; break;
case "TOPIC": case "TOPIC":
var channel = msg.params[0]; var channel = msg.params[0];
var topic = msg.params[1];
this.setBufferState({ server: serverID, name: channel }, { topic });
this.addMessage(serverID, channel, msg); this.addMessage(serverID, channel, msg);
break; break;
case "INVITE": case "INVITE":

View File

@ -339,6 +339,10 @@ export const State = {
var who = { ...buf.who, away: !!awayMessage }; var who = { ...buf.who, away: !!awayMessage };
return { who }; return { who };
}); });
case "TOPIC":
var channel = msg.params[0];
var topic = msg.params[1];
return updateBuffer(channel, { topic });
} }
}, },
}; };