fix can_comment_on_post when viewing wall-to-wall

This commit is contained in:
friendica
2013-09-28 04:41:12 -07:00
parent 8fe5575469
commit 110974eb55
4 changed files with 35 additions and 15 deletions

View File

@@ -154,7 +154,10 @@ class Conversation extends BaseObject {
$item->set_commentable(false);
}
elseif(($this->observer) && (! $item->is_commentable())) {
$item->set_commentable(can_comment_on_post($this->observer['xchan_hash'],$item->data));
if((array_key_exists('owner',$item->data)) && ($item->data['owner']['abook_flags'] & ABOOK_FLAG_SELF))
$item->set_commentable(perm_is_allowed($this->profile_owner,$this->observer['xchan_hash'],'post_comments'));
else
$item->set_commentable(can_comment_on_post($this->observer['xchan_hash'],$item->data));
}
$item->set_conversation($this);