1
0
Fork 0

Fix condition for follows export

- Select follows instead of followers
- Filter out archived contacts
This commit is contained in:
Hypolite Petovan 2022-10-24 17:56:44 -04:00
parent 142b399c84
commit dc2d96a502

View file

@ -222,7 +222,7 @@ class UserExport extends BaseSettings
// write the table header (like Mastodon) // write the table header (like Mastodon)
echo "Account address, Show boosts\n"; echo "Account address, Show boosts\n";
// get all the contacts // get all the contacts
$contacts = DBA::select('contact', ['addr', 'url'], ['uid' => $user_id, 'self' => false, 'rel' => [1, 3], 'deleted' => false]); $contacts = DBA::select('contact', ['addr', 'url'], ['uid' => $user_id, 'self' => false, 'rel' => [Contact::SHARING, Contact::FRIEND], 'deleted' => false, 'archive' => false]);
while ($contact = DBA::fetch($contacts)) { while ($contact = DBA::fetch($contacts)) {
echo ($contact['addr'] ?: $contact['url']) . ", true\n"; echo ($contact['addr'] ?: $contact['url']) . ", true\n";
} }