Diaspora will introduce "like on comment" so we doing it as well

This commit is contained in:
Michael 2017-09-08 05:36:00 +00:00
parent 1600d8e2a6
commit 6e196a6afd
2 changed files with 15 additions and 14 deletions

View file

@ -68,6 +68,11 @@ class Item extends BaseObject {
continue;
}
// You can always comment on Diaspora items
if (($item['network'] == NETWORK_DIASPORA) && (local_user() == $item['uid'])) {
$item['writable'] = true;
}
$item['pagedrop'] = $data['pagedrop'];
$child = new Item($item);
$this->add_child($child);
@ -319,18 +324,6 @@ class Item extends BaseObject {
unset($buttons["like"]);
}
// Diaspora isn't able to do likes on comments - but Hubzilla does
/// @todo When Diaspora will pass this information we will remove these lines
if (($item["item_network"] == NETWORK_DIASPORA) && ($indent == 'comment') &&
!Diaspora::is_redmatrix($item["owner-link"]) && isset($buttons["like"])) {
unset($buttons["like"]);
}
// Facebook can like comments - but it isn't programmed in the connector yet.
if (($item["item_network"] == NETWORK_FACEBOOK) && ($indent == 'comment') && isset($buttons["like"])) {
unset($buttons["like"]);
}
$tmp_item = array(
'template' => $this->get_template(),
'type' => implode("",array_slice(explode("/",$item['verb']),-1)),