Improve query handling for CommandsInfluencer

This commit is contained in:
Özenç Bilgili 2020-05-21 02:17:53 +03:00
parent fc8338bb35
commit a38ebe3d53

View File

@ -493,7 +493,7 @@ class CommandsInfluencer extends Influencer {
const commands = this._commands; const commands = this._commands;
commands.forEach(command => { commands.forEach(command => {
if(command.key.startsWith(rawQuery)){ if(this._getDomain(command.url).startsWith(rawQuery)){
suggestions.push(command.url); suggestions.push(command.url);
} }
}); });
@ -510,7 +510,7 @@ class CommandsInfluencer extends Influencer {
else { else {
return null; return null;
} }
} }
_getDomain(url){ _getDomain(url){
let hostName = this._getHostName(url); let hostName = this._getHostName(url);