]> git.mxchange.org Git - friendica.git/commitdiff
Separate JSON output of contact lists in message_recipient template
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 23 Apr 2023 20:31:29 +0000 (16:31 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 23 Apr 2023 20:31:29 +0000 (16:31 -0400)
src/Core/ACL.php
view/templates/acl/message_recipient.tpl

index f7b89240550c0c87715218015394413cc3435e4a..aa5e2221b782493a4b782fe11dd0bea75596eeb9 100644 (file)
@@ -66,8 +66,9 @@ class ACL
 
                $tpl = Renderer::getMarkupTemplate('acl/message_recipient.tpl');
                $o = Renderer::replaceMacros($tpl, [
-                       '$contacts' => json_encode($contacts),
-                       '$selected' => $selected,
+                       '$contacts'      => $contacts,
+                       '$contacts_json' => json_encode($contacts),
+                       '$selected'      => $selected,
                ]);
 
                Hook::callAll(DI::args()->getModuleName() . '_post_recipient', $o);
index b8aabf8c7f2a862ea3f94df1a1263b9687ffec87..701ba23a60eaf4cb7e0b7994ba7c382767db7b74 100644 (file)
@@ -9,7 +9,7 @@
                let $recipient_input = $('[name="recipient"]');
 
                let acl = new Bloodhound({
-                       local: {{$contacts nofilter}},
+                       local: {{$contacts_json nofilter}},
                        identify: function(obj) { return obj.id.toString(); },
                        datumTokenizer: Bloodhound.tokenizers.obj.whitespace(['name', 'addr']),
                        queryTokenizer: Bloodhound.tokenizers.whitespace,