don't notify typing for commands

This commit is contained in:
Iuri Matias 2018-11-08 17:45:59 -05:00
parent 7f28917c29
commit 4479e7fc2b
2 changed files with 6 additions and 5 deletions

View File

@ -212,8 +212,9 @@ ui.logEntry(`Rejoining Channels....`);
}
});
ui.events.on('typing', () => {
ui.events.on('typing', (currentText) => {
// TODO: use async.cargo instead and/or a to avoid unnecessary requests
if (currentText[0] === '/') return;
const channel = channels.getCurrentChannel();
if(!channel.pubKey){
// TODO: the json message is being displayed in the UI

View File

@ -243,7 +243,7 @@ class UI {
});
this.input.key('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split(''), function () {
self.events.emit("typing");
self.events.emit("typing", self.input.value);
});
this.input.on('submit', this.submitCmd.bind(this));