mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-12 11:28:49 +00:00
jappixmini: autosubscribe only when contacts list changed
This commit is contained in:
parent
9c7b38fb4a
commit
fb7f2b1122
2 changed files with 23 additions and 12 deletions
|
@ -458,6 +458,7 @@ function jappixmini_script(&$a,&$s) {
|
|||
$contacts[$address] = $name;
|
||||
}
|
||||
$contacts_json = json_encode($contacts);
|
||||
$contacts_hash = sha1($contacts_json);
|
||||
|
||||
// get nickname
|
||||
$r = q("SELECT `username` FROM `user` WHERE `uid`=$uid");
|
||||
|
@ -466,7 +467,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', '$proxy', '$bosh', $encrypt, '$password', $nickname, $contacts_json, $autoapprove, $autosubscribe);
|
||||
jappixmini_addon_start('$server', '$username', '$proxy', '$bosh', $encrypt, '$password', $nickname, $contacts_json, '$contacts_hash', $autoapprove, $autosubscribe);
|
||||
});
|
||||
</script>";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue