jappixmini: move jappixmini_manage_roster into callback

This commit is contained in:
Leberwurscht 2012-04-15 23:13:37 +02:00
parent 6034ba3263
commit 89473b5e03
2 changed files with 4 additions and 3 deletions

View 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>";

View 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