aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/autocomplete.js
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-06-17 07:33:46 +0000
committerMario <mario@mariovavti.com>2021-06-17 07:33:46 +0000
commitfa076efd3bd953863f01bcb474ddb4fc928507e7 (patch)
treed1a6f9e97ac919f91f7658aa16132565deae014a /view/js/autocomplete.js
parent9b71c090c5c8d051e6997c4a39241bbbd5cb6cee (diff)
parentb55676d08914d58927b5503a1bfa283397cd6d44 (diff)
downloadvolse-hubzilla-fa076efd3bd953863f01bcb474ddb4fc928507e7.tar.gz
volse-hubzilla-fa076efd3bd953863f01bcb474ddb4fc928507e7.tar.bz2
volse-hubzilla-fa076efd3bd953863f01bcb474ddb4fc928507e7.zip
Merge branch 'dm' into 'dev'
New landing page HQ with separate views for direct messages, public/limited messages and starred messages if the feature is enabled See merge request hubzilla/core!1969
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 );