]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/APContact.php
Fixing a bug, adding some logging
[friendica.git] / src / Model / APContact.php
index 3a9f42fdd791cef939faef865bb82ef3aa7a3b42..71f3cfae47bac438192582cc77ef8605d84c35b7 100644 (file)
@@ -157,7 +157,7 @@ class APContact extends BaseObject
 
                $apcontact['pubkey'] = trim(JsonLD::fetchElement($compacted, 'w3id:publicKey', 'w3id:publicKeyPem'));
 
-               $manually_approve = JsonLD::fetchElement($compacted, 'as:manuallyApprovesFollowers');
+               $apcontact['manually-approve'] = (int)JsonLD::fetchElement($compacted, 'as:manuallyApprovesFollowers');
 
                // To-Do
 
@@ -204,8 +204,8 @@ class APContact extends BaseObject
                                        $contact_fields['prv'] = false;
                                } else {
                                        // Otherwise set the corresponding forum type
-                                       $contact_fields['forum'] = !$manually_approve;
-                                       $contact_fields['prv'] = $manually_approve;
+                                       $contact_fields['forum'] = !$apcontact['manually-approve'];
+                                       $contact_fields['prv'] = $apcontact['manually-approve'];
                                }
                        }
                }