optimise Onepoll so it doesn't try and fetch posts for a channel that we've not given permission to send us their stream and posts. Currently the posts are fetched, processed, and ultimately discarded. Since we know they are going to be discarded, there's not much point fetching them in the first place.
This commit is contained in:
parent
6c672d2575
commit
a8a3812890
@ -102,11 +102,20 @@ class Onepoll {
|
||||
$fetch_feed = true;
|
||||
$x = null;
|
||||
|
||||
// They haven't given us permission to see their stream
|
||||
|
||||
$can_view_stream = intval(get_abconfig($importer_uid,$contact['abook_xchan'],'their_perms','view_stream'));
|
||||
|
||||
if(! $can_view_stream)
|
||||
$fetch_feed = false;
|
||||
|
||||
// we haven't given them permission to send us their stream
|
||||
|
||||
$can_send_stream = intval(get_abconfig($importer_uid,$contact['abook_xchan'],'my_perms','send_stream'));
|
||||
|
||||
if(! $can_send_stream)
|
||||
$fetch_feed = false;
|
||||
|
||||
if($fetch_feed) {
|
||||
|
||||
$feedurl = str_replace('/poco/','/zotfeed/',$contact['xchan_connurl']);
|
||||
|
Reference in New Issue
Block a user