aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/identity.php25
-rwxr-xr-xinclude/items.php26
2 files changed, 50 insertions, 1 deletions
diff --git a/include/identity.php b/include/identity.php
index 47738a8fa..bb905e18f 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -631,6 +631,31 @@ function identity_basic_export($channel_id, $items = false) {
if($r)
$ret['likes'] = $r;
+
+ $r = q("select * from conv where uid = %d",
+ intval($channel_id)
+ );
+ if($r)
+ $ret['conv'] = $r;
+
+
+ $r = q("select mail.*, conv.guid as conv_guid from mail left join conv on mail.convid = conv.id where mail.uid = %d",
+ intval($channel_id)
+ );
+ if($r) {
+ $m = array();
+ foreach($r as $rr) {
+
+
+
+
+ }
+ $ret['mail'] = $m;
+ }
+
+
+
+
$r = q("select item_id.*, item.mid from item_id left join item on item_id.iid = item.id where item_id.uid = %d",
intval($channel_id)
);
diff --git a/include/items.php b/include/items.php
index e7cc02579..5569cd1e4 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1559,7 +1559,7 @@ function encode_item_flags($item) {
return $ret;
}
-function encode_mail($item) {
+function encode_mail($item,$extended = false) {
$x = array();
$x['type'] = 'mail';
$x['encoding'] = 'zot';
@@ -1592,6 +1592,18 @@ function encode_mail($item) {
$x['body'] = '';
}
+ if($extended) {
+ $x['conv_guid'] = $item['conv_guid'];
+ if(intval($item['mail_deleted']))
+ $x['flags'][] = 'deleted';
+ if(intval($item['mail_replied']))
+ $x['flags'][] = 'replied';
+ if(intval($item['mail_isreply']))
+ $x['flags'][] = 'isreply';
+ if(intval($item['mail_seen']))
+ $x['flags'][] = 'seen';
+ }
+
return $x;
}
@@ -1616,6 +1628,18 @@ function get_mail_elements($x) {
if(in_array('recalled',$x['flags'])) {
$arr['mail_recalled'] = 1;
}
+ if(in_array('replied',$x['flags'])) {
+ $arr['mail_replied'] = 1;
+ }
+ if(in_array('isreply',$x['flags'])) {
+ $arr['mail_isreply'] = 1;
+ }
+ if(in_array('seen',$x['flags'])) {
+ $arr['mail_seen'] = 1;
+ }
+ if(in_array('deleted',$x['flags'])) {
+ $arr['mail_deleted'] = 1;
+ }
}
$key = get_config('system','pubkey');