forked from friendica/friendica-addons
jappixmini: move jappixmini_manage_roster into callback
This commit is contained in:
parent
6034ba3263
commit
89473b5e03
|
@ -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>";
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue