From 04362644bfcda6578af103c5dcc6af6fae2d3167 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 4 Jun 2021 18:57:02 +0200 Subject: [PATCH] Handle TOPIC in State.handleMessage --- components/app.js | 3 --- state.js | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/components/app.js b/components/app.js index be9aae1..f9e1b05 100644 --- a/components/app.js +++ b/components/app.js @@ -636,9 +636,6 @@ export default class App extends Component { break; case "TOPIC": var channel = msg.params[0]; - var topic = msg.params[1]; - - this.setBufferState({ server: serverID, name: channel }, { topic }); this.addMessage(serverID, channel, msg); break; case "INVITE": diff --git a/state.js b/state.js index 2360abc..d9f1043 100644 --- a/state.js +++ b/state.js @@ -339,6 +339,10 @@ export const State = { var who = { ...buf.who, away: !!awayMessage }; return { who }; }); + case "TOPIC": + var channel = msg.params[0]; + var topic = msg.params[1]; + return updateBuffer(channel, { topic }); } }, };