- $condition = ['id' => [$item_id, $parent_id], 'visible' => true, 'moderated' => false];
+ $condition = ['id' => [$item_id, $parent_id], 'moderated' => false];
$params = ['order' => ['id']];
$itemdata = Item::select([], $condition, $params);
$params = ['order' => ['id']];
$itemdata = Item::select([], $condition, $params);
$target_importer = array_merge($target_importer, $user);
// Set the user id. This is important if this is a public contact
$target_importer = array_merge($target_importer, $user);
// Set the user id. This is important if this is a public contact
// Se we transmit with the new method and via Diaspora as a fallback
if (!empty($items) && (($items[0]['uid'] == 0) || ($contact['uid'] == 0))) {
// Transmit in public if it's a relay post
// Se we transmit with the new method and via Diaspora as a fallback
if (!empty($items) && (($items[0]['uid'] == 0) || ($contact['uid'] == 0))) {
// Transmit in public if it's a relay post
$deliver_status = DFRN::transmit($owner, $contact, $atom, $public_dfrn);
$deliver_status = DFRN::transmit($owner, $contact, $atom, $public_dfrn);
private static function deliverDiaspora($cmd, $contact, $owner, $items, $target_item, $public_message, $top_level, $followup)
{
// We don't treat Forum posts as "wall-to-wall" to be able to post them via Diaspora
private static function deliverDiaspora($cmd, $contact, $owner, $items, $target_item, $public_message, $top_level, $followup)
{
// We don't treat Forum posts as "wall-to-wall" to be able to post them via Diaspora
if ($reply_to) {
$headers = 'From: ' . Email::encodeHeader($local_user['username'],'UTF-8') . ' <' . $reply_to.'>' . "\n";
$headers .= 'Sender: ' . $local_user['email'] . "\n";
if ($reply_to) {
$headers = 'From: ' . Email::encodeHeader($local_user['username'],'UTF-8') . ' <' . $reply_to.'>' . "\n";
$headers .= 'Sender: ' . $local_user['email'] . "\n";