allow diaspora posts to be delivered to the discover channel unless prohibited from doing so.
This commit is contained in:
		| @@ -15,8 +15,10 @@ function diaspora_dispatch_public($msg) { | |||||||
| 		return; | 		return; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// find everybody following or allowing this author | 	$sys_disabled = get_config('system','disable_diaspora_discover_tab'); | ||||||
|  | 	$sys = (($sys_disabled) ? null : get_sys_channel()); | ||||||
|  |  | ||||||
|  | 	// find everybody following or allowing this author | ||||||
|  |  | ||||||
| 	$r = q("SELECT * from channel where channel_id in ( SELECT abook_channel from abook left join xchan on abook_xchan = xchan_hash WHERE xchan_network like '%%diaspora%%' and xchan_addr = '%s' )", | 	$r = q("SELECT * from channel where channel_id in ( SELECT abook_channel from abook left join xchan on abook_xchan = xchan_hash WHERE xchan_network like '%%diaspora%%' and xchan_addr = '%s' )", | ||||||
| 		dbesc($msg['author']) | 		dbesc($msg['author']) | ||||||
| @@ -29,6 +31,8 @@ function diaspora_dispatch_public($msg) { | |||||||
| 			logger('diaspora_public: delivering to: ' . $rr['channel_name'] . ' (' . $rr['channel_address'] . ') '); | 			logger('diaspora_public: delivering to: ' . $rr['channel_name'] . ' (' . $rr['channel_address'] . ') '); | ||||||
| 			diaspora_dispatch($rr,$msg); | 			diaspora_dispatch($rr,$msg); | ||||||
| 		} | 		} | ||||||
|  | 		if($sys) | ||||||
|  | 			diaspora_dispatch($sys,$msg); | ||||||
| 	} | 	} | ||||||
| 	else | 	else | ||||||
| 		logger('diaspora_public: no subscribers'); | 		logger('diaspora_public: no subscribers'); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user