aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/autocomplete.js
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-07-29 06:59:13 +0000
committerMario <mario@mariovavti.com>2021-07-29 06:59:13 +0000
commit9722d157bf138753bc168f68c56b4963db6da4e9 (patch)
treea15bb81c35a2367fe4628614471d471ed86d2712 /view/js/autocomplete.js
parent219d47f04c7bb04dcc241b9ed6ca411fc9653f09 (diff)
parentc6133d2558ce29e44342fa7be8bb65e0059aea02 (diff)
downloadvolse-hubzilla-9722d157bf138753bc168f68c56b4963db6da4e9.tar.gz
volse-hubzilla-9722d157bf138753bc168f68c56b4963db6da4e9.tar.bz2
volse-hubzilla-9722d157bf138753bc168f68c56b4963db6da4e9.zip
Merge branch 'dev' into bs5
Diffstat (limited to 'view/js/autocomplete.js')
-rw-r--r--view/js/autocomplete.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js
index c45c47518..f20c45982 100644
--- a/view/js/autocomplete.js
+++ b/view/js/autocomplete.js
@@ -162,8 +162,8 @@ function string2bb(element) {
if (typeof extra_channels === 'undefined') extra_channels = false;
// Autocomplete contacts
- contacts = {
- match: /(^|\s)(@\!*)([^ \n]{3,})$/,
+ channels = {
+ match: /(^(?=[^\!]{2})|\s)(@)([^ \n]{3,})$/,
index: 3,
cache: true,
search: function(term, callback) { contact_search(term, callback, backend_url, 'c', extra_channels, spinelement=false); },
@@ -171,6 +171,15 @@ function string2bb(element) {
template: contact_format
};
+ contacts = {
+ match: /(^|\s)(@\!)([^ \n]{3,})$/,
+ index: 3,
+ cache: true,
+ search: function(term, callback) { contact_search(term, callback, backend_url, 'm', extra_channels, spinelement=false); },
+ replace: editor_replace,
+ template: contact_format
+ };
+
// Autocomplete hashtags
tags = {
match: /(^|\s)(\#)([^ \n]{2,})$/,
@@ -202,7 +211,7 @@ function string2bb(element) {
maxCount: 100
}
});
- textcomplete.register([contacts,smilies,tags]);
+ textcomplete.register([channels,contacts,smilies,tags]);
});
};
})( jQuery );