]> git.mxchange.org Git - friendica-addons.git/commitdiff
jappixmini: move jappixmini_manage_roster into callback
authorLeberwurscht <leberwurscht@hoegners.de>
Sun, 15 Apr 2012 21:13:37 +0000 (23:13 +0200)
committerLeberwurscht <leberwurscht@hoegners.de>
Sun, 15 Apr 2012 21:13:37 +0000 (23:13 +0200)
jappixmini/jappixmini.php
jappixmini/lib.js

index 80fc237f454da43f3b317d072dcf531cdc0cc90d..3b03743da39ed35445c542c73d4709a25af77a0b 100644 (file)
@@ -418,8 +418,7 @@ function jappixmini_script(&$a,&$s) {
     // add javascript to start Jappix Mini
     $a->page['htmlhead'] .= "<script type=\"text/javascript\">
         jQuery(document).ready(function() {
-           jappixmini_addon_start('$server', '$username', '$bosh', $encrypt, '$password', $nickname);
-           jappixmini_manage_roster($contacts_json, $autoapprove, $autosubscribe);
+           jappixmini_addon_start('$server', '$username', '$bosh', $encrypt, '$password', $nickname, $contacts_json, $autoapprove, $autosubscribe);
         });
     </script>";
 
index 94e465d1ea57c8e8773f8112e15abf8acdd56681..351d03f97717a61508e6b0593fc4af79262d3617 100644 (file)
@@ -130,7 +130,7 @@ function jappixmini_addon_subscribe() {
        sendSubscribe(xid, "subscribe");
 }
 
-function jappixmini_addon_start(server, username, bosh, encrypted, password, nickname) {
+function jappixmini_addon_start(server, username, bosh, encrypted, password, nickname, contacts, autoapprove, autosubscribe) {
     handler = function(password){
         // check if settings have changed, reinitialize jappix mini if this is the case
         settings_identifier = str_sha1(server);
@@ -149,7 +149,9 @@ function jappixmini_addon_start(server, username, bosh, encrypted, password, nic
 
         // start jappix mini
         MINI_NICKNAME = nickname;
+        console.log("launchMini");
         launchMini(true, false, server, username, password);
+       jappixmini_manage_roster(contacts, autoapprove, autosubscribe)
     }
 
     // decrypt password if necessary