// 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>";
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);
// 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