Commit da185196 authored by Zot's avatar Zot Committed by Mario

allow commenting on diaspora reshares


(cherry picked from commit 5e00a059)
parent 010fa83c
...@@ -648,6 +648,13 @@ class Diaspora_Receiver { ...@@ -648,6 +648,13 @@ class Diaspora_Receiver {
$datarray['body'] = $newbody; $datarray['body'] = $newbody;
$datarray['app'] = 'Diaspora'; $datarray['app'] = 'Diaspora';
// Diaspora allows anybody to comment on public posts in theory
// In fact the comment will be rejected unless it is correctly signed
if($this->importer['system'] || $this->msg['public']) {
$datarray['comment_policy'] = 'network: diaspora';
}
$tgroup = tgroup_check($this->importer['channel_id'],$datarray); $tgroup = tgroup_check($this->importer['channel_id'],$datarray);
if((! $this->importer['system']) && (! perm_is_allowed($this->importer['channel_id'],$contact['xchan_hash'],'send_stream')) && (! $tgroup)) { if((! $this->importer['system']) && (! perm_is_allowed($this->importer['channel_id'],$contact['xchan_hash'],'send_stream')) && (! $tgroup)) {
...@@ -664,6 +671,8 @@ class Diaspora_Receiver { ...@@ -664,6 +671,8 @@ class Diaspora_Receiver {
if(! post_is_importable($datarray,$contact)) { if(! post_is_importable($datarray,$contact)) {
logger('diaspora_reshare: filtering this author.'); logger('diaspora_reshare: filtering this author.');
return 202; return 202;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment