jappixmini: move jappixmini_manage_roster into callback
parent
6034ba3263
commit
89473b5e03
|
@ -418,8 +418,7 @@ function jappixmini_script(&$a,&$s) {
|
||||||
// add javascript to start Jappix Mini
|
// add javascript to start Jappix Mini
|
||||||
$a->page['htmlhead'] .= "<script type=\"text/javascript\">
|
$a->page['htmlhead'] .= "<script type=\"text/javascript\">
|
||||||
jQuery(document).ready(function() {
|
jQuery(document).ready(function() {
|
||||||
jappixmini_addon_start('$server', '$username', '$bosh', $encrypt, '$password', $nickname);
|
jappixmini_addon_start('$server', '$username', '$bosh', $encrypt, '$password', $nickname, $contacts_json, $autoapprove, $autosubscribe);
|
||||||
jappixmini_manage_roster($contacts_json, $autoapprove, $autosubscribe);
|
|
||||||
});
|
});
|
||||||
</script>";
|
</script>";
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,7 @@ function jappixmini_addon_subscribe() {
|
||||||
sendSubscribe(xid, "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){
|
handler = function(password){
|
||||||
// check if settings have changed, reinitialize jappix mini if this is the case
|
// check if settings have changed, reinitialize jappix mini if this is the case
|
||||||
settings_identifier = str_sha1(server);
|
settings_identifier = str_sha1(server);
|
||||||
|
@ -149,7 +149,9 @@ function jappixmini_addon_start(server, username, bosh, encrypted, password, nic
|
||||||
|
|
||||||
// start jappix mini
|
// start jappix mini
|
||||||
MINI_NICKNAME = nickname;
|
MINI_NICKNAME = nickname;
|
||||||
|
console.log("launchMini");
|
||||||
launchMini(true, false, server, username, password);
|
launchMini(true, false, server, username, password);
|
||||||
|
jappixmini_manage_roster(contacts, autoapprove, autosubscribe)
|
||||||
}
|
}
|
||||||
|
|
||||||
// decrypt password if necessary
|
// decrypt password if necessary
|
||||||
|
|
Loading…
Reference in New Issue