aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-11-17 19:22:24 -0800
committerfriendica <info@friendica.com>2013-11-17 19:22:24 -0800
commit13538cdd21c6e13a2ff108f1b42dbecaab8b375a (patch)
treeb9d67c87b02bf7d5b823cbe2eb3d5a381e2cd3bd /include/zot.php
parent772e3795bf1513b5f8ac3ab520c6c8cdb68de3af (diff)
downloadvolse-hubzilla-13538cdd21c6e13a2ff108f1b42dbecaab8b375a.tar.gz
volse-hubzilla-13538cdd21c6e13a2ff108f1b42dbecaab8b375a.tar.bz2
volse-hubzilla-13538cdd21c6e13a2ff108f1b42dbecaab8b375a.zip
pull in some posts when we first connect with a new channel (if allowed to) - if not allowed to, do it if that condition changes
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/zot.php b/include/zot.php
index 71f720a6d..018f00ba5 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -346,12 +346,12 @@ function zot_refresh($them,$channel = null) {
if($z)
proc_run('php','include/notifier.php','permission_update',$z[0]['abook_id']);
}
- $new_connection = q("select abook_id from abook where abook_channel = %d and abook_xchan = '%s' order by abook_created desc limit 1",
+ $new_connection = q("select abook_id, abook_flags from abook where abook_channel = %d and abook_xchan = '%s' order by abook_created desc limit 1",
intval($channel['channel_id']),
dbesc($x['hash'])
);
- if($new_connection && ($their_perms & PERMS_R_STREAM))
+ if($new_connection && (! ($new_connection[0]['abook_flags'] & ABOOK_FLAG_PENDING)) && ($their_perms & PERMS_R_STREAM))
proc_run('php','include/onepoll.php',$new_connection[0]['abook_id']);
}