use prepare_body in api calls to properly render content, add 'mode' to conversation templates so that themes can use the module context to suppress or show comments as desired

This commit is contained in:
friendica
2013-09-16 22:40:53 -07:00
parent 1c5d56eedc
commit c6d6c01fb6
4 changed files with 13 additions and 8 deletions

View File

@@ -88,6 +88,8 @@ class Item extends BaseObject {
: false);
$shareable = ((($conv->get_profile_owner() == local_user()) && ($item['item_private'] != 1)) ? true : false);
$mode = $conv->get_mode();
if(local_user() && $observer['xchan_hash'] === $item['author_xchan'])
$edpost = array($a->get_baseurl($ssl_state)."/editpost/".$item['id'], t("Edit"));
else
@@ -183,7 +185,7 @@ class Item extends BaseObject {
$tmp_item = array(
'template' => $this->get_template(),
'mode' => $mode,
'type' => implode("",array_slice(explode("/",$item['verb']),-1)),
'tags' => array(),
'body' => $body,