DEV: makes transformComplete async (#12752)

DEV: makes transformComplete async (#12752)

This is used to apply multiple transformations following user input.

diff --git a/app/assets/javascripts/discourse/app/lib/autocomplete.js b/app/assets/javascripts/discourse/app/lib/autocomplete.js
index a93bfe6..d95cc46 100644
--- a/app/assets/javascripts/discourse/app/lib/autocomplete.js
+++ b/app/assets/javascripts/discourse/app/lib/autocomplete.js
@@ -186,7 +186,7 @@ export default function (options) {
       });
   }
 
-  let completeTerm = function (term) {
+  let completeTerm = async function (term) {
     if (term) {
       if (isInput) {
         me.val("");
@@ -196,7 +196,7 @@ export default function (options) {
         addInputSelectedItem(term, true);
       } else {
         if (options.transformComplete) {
-          term = options.transformComplete(term);
+          term = await options.transformComplete(term);
         }
 
         if (term) {

GitHub sha: 191fac5c

This commit appears in #12752 which was approved by CvX. It was merged by jjaffeux.