return false;
break;
}
+ $this->mode = $mode;
}
/**
logger('[WARN] Conversation::add_thread : Thread already exists ('. $item->get_id() .').', LOGGER_DEBUG);
return false;
}
+
+ /*
+ * Only add will be displayed
+ */
+ if($item->get_data_value('network') === NETWORK_MAIL && local_user() != $item->get_data_value('uid')) {
+ logger('[WARN] Conversation::add_thread : Thread is a mail ('. $item->get_id() .').', LOGGER_DEBUG);
+ return false;
+ }
+ if($item->get_data_value('verb') === ACTIVITY_LIKE || $item->get_data_value('verb') === ACTIVITY_DISLIKE) {
+ logger('[WARN] Conversation::add_thread : Thread is a (dis)like ('. $item->get_id() .').', LOGGER_DEBUG);
+ return false;
+ }
$item->set_conversation($this);
$this->threads[] = $item;
return end($this->threads);
* _ The data requested on success
* _ false on failure
*/
- public function get_template_data($cmnt_tpl, $alike, $dlike) {
+ public function get_template_data($alike, $dlike) {
$result = array();
foreach($this->threads as $item) {
if($item->get_data_value('network') === NETWORK_MAIL && local_user() != $item->get_data_value('uid'))
continue;
- $item_data = $item->get_template_data($cmnt_tpl, $alike, $dlike);
+ $item_data = $item->get_template_data($alike, $dlike);
if(!$item_data) {
logger('[ERROR] Conversation::get_template_data : Failed to get item template data ('. $item->get_id() .').', LOGGER_DEBUG);
return false;