diff options
Diffstat (limited to 'include/diaspora.php')
-rwxr-xr-x | include/diaspora.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/diaspora.php b/include/diaspora.php index fc7dbfa18..8968ee5f4 100755 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -24,8 +24,9 @@ function diaspora_dispatch_public($msg) { // 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' )", - dbesc($msg['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' ) and ( channel_pageflags & %d ) = 0 ", + dbesc($msg['author']), + intval(PAGE_REMOVED) ); // also need to look for those following public streams @@ -2390,6 +2391,11 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) { $a = get_app(); $myaddr = $owner['channel_address'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3); + if(intval($item['id']) != intval($item['parent'])) { + logger('attempted to send a comment as a top-level post'); + return; + } + $images = array(); $title = $item['title']; |