Ensure that local contacts always are DFRN contacts

This commit is contained in:
Michael 2020-01-16 06:43:21 +00:00
parent 7db4c7ea02
commit ccc7a71e54
5 changed files with 52 additions and 9 deletions

View file

@ -177,12 +177,12 @@ class Cron
FROM `user`
STRAIGHT_JOIN `contact`
ON `contact`.`uid` = `user`.`uid` AND `contact`.`poll` != ''
AND `contact`.`network` IN (?, ?, ?, ?)
AND `contact`.`network` IN (?, ?, ?, ?, ?)
AND NOT `contact`.`self` AND NOT `contact`.`blocked`
AND `contact`.`rel` != ?
WHERE NOT `user`.`account_expired` AND NOT `user`.`account_removed`";
$parameters = [Protocol::DFRN, Protocol::OSTATUS, Protocol::FEED, Protocol::MAIL, Contact::FOLLOWER];
$parameters = [Protocol::DFRN, Protocol::ACTIVITYPUB, Protocol::OSTATUS, Protocol::FEED, Protocol::MAIL, Contact::FOLLOWER];
// Only poll from those with suitable relationships,
// and which have a polling address and ignore Diaspora since
@ -209,6 +209,11 @@ class Cron
$contact['priority'] = 3;
}
// ActivityPub is checked once a week
if ($contact['network'] == Protocol::ACTIVITYPUB) {
$contact['priority'] = 4;
}
// Check archived contacts once a month
if ($contact['archive']) {
$contact['priority'] = 5;