mail recall - just set mail_flags = mail_flags & MAIL_RECALLED and tell the notifier. We'll need a special button for this. Also should probably report whether it was seen or not. Will do that another day.
This commit is contained in:
@@ -773,6 +773,12 @@ function encode_mail($item) {
|
||||
$x['from'] = encode_item_xchan($item['from']);
|
||||
$x['to'] = encode_item_xchan($item['to']);
|
||||
|
||||
if($item['mail_flags'] & MAIL_RECALLED) {
|
||||
$x['flags'] = 'recalled';
|
||||
$x['title'] = '';
|
||||
$x['body'] = '';
|
||||
}
|
||||
|
||||
return $x;
|
||||
}
|
||||
|
||||
@@ -786,6 +792,15 @@ function get_mail_elements($x) {
|
||||
|
||||
$arr['created'] = datetime_convert('UTC','UTC',$x['created']);
|
||||
|
||||
$arr['mail_flags'] = 0;
|
||||
|
||||
if($x['flags'] && is_array($x['flags'])) {
|
||||
if(in_array('recalled',$x['flags'])) {
|
||||
$arr['mail_flags'] &= MAIL_RECALLED;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($arr['created'] > datetime_convert())
|
||||
$arr['created'] = datetime_convert();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user