delivery reports - crude but mostly functional at least for zot deliveries
This commit is contained in:
parent
8ead4745f8
commit
2869ccfe39
@ -286,6 +286,7 @@ class Item extends BaseObject {
|
||||
'body' => $body,
|
||||
'text' => strip_tags($body),
|
||||
'id' => $this->get_id(),
|
||||
'mid' => $item['mid'],
|
||||
'isevent' => $isevent,
|
||||
'attend' => $attend,
|
||||
'consensus' => $consensus,
|
||||
@ -301,6 +302,7 @@ class Item extends BaseObject {
|
||||
'vwall' => t('via Wall-To-Wall:'),
|
||||
'profile_url' => $profile_link,
|
||||
'item_photo_menu' => item_photo_menu($item),
|
||||
'dreport' => t('Delivery Report'),
|
||||
'name' => $profile_name,
|
||||
'thumb' => $profile_avatar,
|
||||
'osparkle' => $osparkle,
|
||||
|
@ -1579,15 +1579,16 @@ function process_delivery($sender, $arr, $deliveries, $relay, $public = false, $
|
||||
continue;
|
||||
}
|
||||
|
||||
$channel = $r[0];
|
||||
$DR->addto_recipient($channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . get_app()->get_hostname() . '>');
|
||||
|
||||
|
||||
if($d['hash'] === $sender['hash']) {
|
||||
$DR->update('self delivery ignored');
|
||||
$result[] = $DR->get();
|
||||
continue;
|
||||
}
|
||||
|
||||
$channel = $r[0];
|
||||
$DR->addto_recipient($channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . get_app()->get_hostname() . '>');
|
||||
|
||||
|
||||
// allow public postings to the sys channel regardless of permissions, but not
|
||||
// for comments travelling upstream. Wait and catch them on the way down.
|
||||
|
@ -26,7 +26,18 @@ function dreport_content(&$a) {
|
||||
return;
|
||||
}
|
||||
|
||||
return print_r($r,true);
|
||||
|
||||
$o .= '<h2>' . sprintf( t('Delivery report for %1$s'),substr($mid,0,32)) . '...' . '</h2>';
|
||||
$o .= '<table>';
|
||||
|
||||
foreach($r as $rr) {
|
||||
$name = escape_tags(substr($rr['dreport_recip'],strpos($rr['dreport_recip'],' ')));
|
||||
$o .= '<tr><td>' . $name . '</td><td>' . $rr['dreport_result'] . '</td><td>' . $rr['dreport_time'] . '</td></tr>';
|
||||
}
|
||||
$o .= '</table>';
|
||||
|
||||
return $o;
|
||||
|
||||
|
||||
|
||||
}
|
@ -123,6 +123,11 @@
|
||||
{{if $item.item_photo_menu}}
|
||||
<li role="presentation" class="divider"></li>
|
||||
{{$item.item_photo_menu}}
|
||||
|
||||
{{if $item.edpost}}
|
||||
<li role="presentation"><a role="menuitem" href="dreport/{{$item.mid}}">{{$item.dreport}}</a></li>
|
||||
{{/if}}
|
||||
|
||||
{{/if}}
|
||||
</ul>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user