diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-07-11 16:11:52 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-07-11 16:11:52 +0200 |
commit | 403e90861cccecc3179e380b084238e1294fe61e (patch) | |
tree | a14f7f3710f729fb91bc2242781cc7b2623b68aa /include/zot.php | |
parent | 271ed82d0def7b658f074ada9adb1aaa51bdd507 (diff) | |
parent | 2d63bbb91e97d3a54440564620ef3093ecbe71fb (diff) | |
download | volse-hubzilla-403e90861cccecc3179e380b084238e1294fe61e.tar.gz volse-hubzilla-403e90861cccecc3179e380b084238e1294fe61e.tar.bz2 volse-hubzilla-403e90861cccecc3179e380b084238e1294fe61e.zip |
Merge red/master
Diffstat (limited to 'include/zot.php')
-rw-r--r-- | include/zot.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/zot.php b/include/zot.php index a8aecc6fa..05475d051 100644 --- a/include/zot.php +++ b/include/zot.php @@ -1761,7 +1761,7 @@ function process_delivery($sender, $arr, $deliveries, $relay, $public = false, $ $result[] = $DR->get(); } else { - update_imported_item($sender,$arr,$r[0],$channel['channel_id'],$tag_delivery); + $item_result = update_imported_item($sender,$arr,$r[0],$channel['channel_id'],$tag_delivery); $DR->update('updated'); $result[] = $DR->get(); if(! $relay) @@ -1810,6 +1810,14 @@ function process_delivery($sender, $arr, $deliveries, $relay, $public = false, $ } } + // preserve conversations with which you are involved from expiration + + $stored = (($item_result && $item_result['item']) ? $item_result['item'] : false); + if((is_array($stored)) && ($stored['id'] != $stored['parent']) + && ($stored['author_xchan'] === $channel['channel_hash'])) { + retain_item($stored['item']['parent']); + } + if($relay && $item_id) { logger('process_delivery: invoking relay'); Zotlabs\Daemon\Master::Summon(array('Notifier','relay',intval($item_id))); @@ -1946,6 +1954,8 @@ function update_imported_item($sender, $item, $orig, $uid, $tag_delivery) { logger('update_imported_item: failed: ' . $x['message']); else logger('update_imported_item'); + + return $x; } /** |