don't notify typing for commands
This commit is contained in:
parent
7f28917c29
commit
4479e7fc2b
|
@ -103,7 +103,7 @@ ui.logEntry(`Rejoining Channels....`);
|
||||||
await status.connect("ws://localhost:8546");
|
await status.connect("ws://localhost:8546");
|
||||||
const pubKey = await status.getPublicKey();
|
const pubKey = await status.getPublicKey();
|
||||||
const userName = await status.getUserName();
|
const userName = await status.getUserName();
|
||||||
|
|
||||||
ui.logEntry(`PK: ${pubKey}`);
|
ui.logEntry(`PK: ${pubKey}`);
|
||||||
ui.logEntry(`-----------------------------------------------------------`);
|
ui.logEntry(`-----------------------------------------------------------`);
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ ui.logEntry(`Rejoining Channels....`);
|
||||||
if(err) {
|
if(err) {
|
||||||
return console.log(err);
|
return console.log(err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setInterval(function() {
|
setInterval(function() {
|
||||||
const channel = channels.getCurrentChannel();
|
const channel = channels.getCurrentChannel();
|
||||||
|
@ -187,7 +187,7 @@ ui.logEntry(`Rejoining Channels....`);
|
||||||
ui.logEntry(`Invalid account`.red);
|
ui.logEntry(`Invalid account`.red);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO:resolve ens username
|
// TODO:resolve ens username
|
||||||
const user = Object.values(channels.allUsers.users).find(x => x.username == destination);
|
const user = Object.values(channels.allUsers.users).find(x => x.username == destination);
|
||||||
if(user){
|
if(user){
|
||||||
|
@ -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
|
// TODO: use async.cargo instead and/or a to avoid unnecessary requests
|
||||||
|
if (currentText[0] === '/') return;
|
||||||
const channel = channels.getCurrentChannel();
|
const channel = channels.getCurrentChannel();
|
||||||
if(!channel.pubKey){
|
if(!channel.pubKey){
|
||||||
// TODO: the json message is being displayed in the UI
|
// TODO: the json message is being displayed in the UI
|
||||||
|
|
|
@ -243,7 +243,7 @@ class UI {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.input.key('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split(''), function () {
|
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));
|
this.input.on('submit', this.submitCmd.bind(this));
|
||||||
|
|
Loading…
Reference in New Issue