aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-07-01 18:18:01 -0700
committerFriendika <info@friendika.com>2011-07-01 18:18:01 -0700
commitd28d2ff440efba47ad65cf28eab4be96e0ea05b2 (patch)
tree506f607dd48aa6cbf4110c1d5c9f23bc430aeef0 /include
parentc23657ab6eb99750fc271f9fd124ea8731180605 (diff)
downloadvolse-hubzilla-d28d2ff440efba47ad65cf28eab4be96e0ea05b2.tar.gz
volse-hubzilla-d28d2ff440efba47ad65cf28eab4be96e0ea05b2.tar.bz2
volse-hubzilla-d28d2ff440efba47ad65cf28eab4be96e0ea05b2.zip
better (more consistent) handling of ostatus contacts
Diffstat (limited to 'include')
-rw-r--r--include/poller.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/poller.php b/include/poller.php
index 5565130e9..569eb59d1 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -310,13 +310,22 @@ function poller_run($argv, $argc){
// Upgrading DB fields from an older Friendika version
// Will only do this once per notify-enabled OStatus contact
+ // or if relationship changes
- if(($contact['notify']) && (! $contact['writable'])) {
- q("UPDATE `contact` SET `writable` = 1 WHERE `id` = %d LIMIT 1",
+ $stat_writeable = ((($contact['notify']) && ($contact['rel'] == REL_VIP || $contact['rel'] == REL_BUD)) ? 1 : 0);
+
+ if($stat_writeable != $contact['writable']) {
+ q("UPDATE `contact` SET `writable` = %d WHERE `id` = %d LIMIT 1",
+ intval($stat_writeable),
intval($contact['id'])
);
}
+ // Are we allowed to import from this person?
+
+ if($contact['rel'] == REL_VIP || $contact['blocked'] || $contact['readonly'])
+ continue;
+
$xml = fetch_url($contact['poll']);
}
elseif($contact['network'] === NETWORK_MAIL) {