Send the 25 last messages for each channel to the client on load

This commit is contained in:
Ken-Håvard Lieng 2017-04-20 01:51:55 +02:00
parent c840d51e16
commit eedc687f18
26 changed files with 300 additions and 268 deletions

View file

@ -11,11 +11,9 @@ export default class MessageInput extends PureComponent {
if (e.which === 13 && e.target.value) {
if (e.target.value[0] === '/') {
runCommand(e.target.value, tab.channel || tab.user, tab.server);
} else if (tab.channel) {
sendMessage(e.target.value, tab.channel, tab.server);
} else if (tab.user) {
sendMessage(e.target.value, tab.user, tab.server);
runCommand(e.target.value, tab.name, tab.server);
} else if (tab.name) {
sendMessage(e.target.value, tab.name, tab.server);
}
addInputHistory(e.target.value);