improved emoji suggestions

This commit is contained in:
unknown 2021-08-10 14:12:00 +05:30
parent 90e67b22b4
commit 5e76d6d865
2 changed files with 26 additions and 1 deletions

View file

@ -213,6 +213,16 @@ function ChannelViewInput({
const cmdPrefix = cmdParts[1];
const cmdSlug = cmdParts[2];
if (cmdPrefix === ':') {
// skip emoji autofill command if link is suspected.
const checkForLink = targetInput.slice(0, cmdParts.index);
if (checkForLink.match(/(http|https|mailto|matrix|ircs|irc)$/)) {
deactivateCmd();
viewEvent.emit('cmd_deactivate');
return;
}
}
cmdCursorPos = cursor;
if (cmdSlug === '') {
activateCmd(cmdPrefix);