aboutsummaryrefslogtreecommitdiffstats
path: root/include/ConversationObject.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/ConversationObject.php')
-rw-r--r--include/ConversationObject.php23
1 files changed, 13 insertions, 10 deletions
diff --git a/include/ConversationObject.php b/include/ConversationObject.php
index 30026e908..5157dad05 100644
--- a/include/ConversationObject.php
+++ b/include/ConversationObject.php
@@ -138,22 +138,25 @@ class Conversation extends BaseObject {
return false;
}
- if(local_user() && $item->get_data_value('uid') == local_user())
- $this->commentable = true;
+// if(local_user() && $item->get_data_value('uid') == local_user())
+// $this->commentable = true;
- if($this->writable)
- $this->commentable = true;
+// if($this->writable)
+// $this->commentable = true;
+
+ $item->set_commentable(false);
+ $ob_hash = (($this->observer) ? $this->observer['xchan_hash'] : '');
+
+ if(($item->get_data_value('author_xchan') === $ob_hash) || ($item->get_data_value('owner_xchan') === $ob_hash))
+ $item->set_commentable(true);
if($item->get_data_value('item_flags') & ITEM_NOCOMMENT) {
- $this->commentable = false;
+ $item->set_commentable(false);
}
- elseif(($this->observer) && (! $this->writable)) {
- $this->commentable = can_comment_on_post($this->observer['xchan_hash'],$item->data);
+ elseif(($this->observer) && (! $item->is_commentable())) {
+ $item->set_commentable(can_comment_on_post($this->observer['xchan_hash'],$item->data));
}
-
-
-
$item->set_conversation($this);
$this->threads[] = $item;
return end($this->threads);