]> git.mxchange.org Git - friendica.git/commitdiff
Import posts from ignored contacts
authorHypolite Petovan <mrpetovan@gmail.com>
Sat, 28 Apr 2018 01:08:19 +0000 (21:08 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Sat, 28 Apr 2018 01:08:19 +0000 (21:08 -0400)
src/Model/Item.php
src/Protocol/DFRN.php
src/Protocol/Diaspora.php
src/Worker/OnePoll.php

index e7fd115dd131f32aea4d3079ba6816f6855fad82..54abc49d602b851c0e4b43d6c0d93edde6e231a8 100644 (file)
@@ -872,7 +872,7 @@ class Item extends BaseObject
 
                $users = [];
 
-               $condition = ["`nurl` IN (SELECT `nurl` FROM `contact` WHERE `id` = ?) AND `uid` != 0 AND NOT `blocked` AND NOT `readonly` AND `rel` IN (?, ?)",
+               $condition = ["`nurl` IN (SELECT `nurl` FROM `contact` WHERE `id` = ?) AND `uid` != 0 AND NOT `blocked` AND `rel` IN (?, ?)",
                        $parent['owner-id'], CONTACT_IS_SHARING,  CONTACT_IS_FRIEND];
                $contacts = dba::select('contact', ['uid'], $condition);
                while ($contact = dba::fetch($contacts)) {
index f233f158a97c69e3ee65299db8ad4839a6388011..ad7658a7641a8fc8737e94bb019bbf51e2461071 100644 (file)
@@ -2799,10 +2799,6 @@ class DFRN
                                return true;
                        }
                } else { // $entrytype == DFRN_TOP_LEVEL
-                       if ($importer["readonly"]) {
-                               logger('ignoring read-only contact '.$importer["id"]);
-                               return;
-                       }
                        if (($importer["uid"] == 0) && ($importer["importer_uid"] != 0)) {
                                logger("Contact ".$importer["id"]." isn't known to user ".$importer["importer_uid"].". The post will be ignored.", LOGGER_DEBUG);
                                return;
index 61d1a586fa7603ee5af055d7e6961d76179cd001..f4a649b51ccbe4de5740416d87965b64cd8a1edd 100644 (file)
@@ -1151,7 +1151,7 @@ class Diaspora
                //}
 
                // We don't seem to like that person
-               if ($contact["blocked"] || $contact["readonly"]) {
+               if ($contact["blocked"]) {
                        // Maybe blocked, don't accept.
                        return false;
                        // We are following this person?
index c1c6fdd1a8da8b2f216044bc2b2eabdcefd60e93..aa3eabf57d039bc861c8df290d26814d336b3c4c 100644 (file)
@@ -309,7 +309,7 @@ class OnePoll
 
                        // Are we allowed to import from this person?
 
-                       if ($contact['rel'] == CONTACT_IS_FOLLOWER || $contact['blocked'] || $contact['readonly']) {
+                       if ($contact['rel'] == CONTACT_IS_FOLLOWER || $contact['blocked']) {
                                // set the last-update so we don't keep polling
                                dba::update('contact', ['last-update' => DateTimeFormat::utcNow()], ['id' => $contact['id']]);
                                return;
@@ -590,7 +590,7 @@ class OnePoll
                        }
 
                        $hubmode = 'subscribe';
-                       if ($contact['network'] === NETWORK_DFRN || $contact['blocked'] || $contact['readonly']) {
+                       if ($contact['network'] === NETWORK_DFRN || $contact['blocked']) {
                                $hubmode = 'unsubscribe';
                        }