diff options
author | zotlabs <mike@macgirvin.com> | 2017-07-10 20:18:33 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-07-10 20:18:33 -0700 |
commit | 2d63bbb91e97d3a54440564620ef3093ecbe71fb (patch) | |
tree | 2f0828a83cfd34cb1303d18034e1c9e1d197c7be /include/import.php | |
parent | e3734328eb7393bbdb76ce195d735ab48aa87324 (diff) | |
download | volse-hubzilla-2d63bbb91e97d3a54440564620ef3093ecbe71fb.tar.gz volse-hubzilla-2d63bbb91e97d3a54440564620ef3093ecbe71fb.tar.bz2 volse-hubzilla-2d63bbb91e97d3a54440564620ef3093ecbe71fb.zip |
prevent expiration of conversations you are involved with - allows you to find your own comments months from now
Diffstat (limited to 'include/import.php')
-rw-r--r-- | include/import.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/import.php b/include/import.php index 277d6618c..2199400af 100644 --- a/include/import.php +++ b/include/import.php @@ -627,6 +627,14 @@ function import_items($channel, $items, $sync = false, $relocate = null) { $item_result = item_store($item,$allow_code,$deliver); } + // preserve conversations you've been involved in from being expired + + $stored = $item_result['item']; + if((is_array($stored)) && ($stored['id'] != $stored['parent']) + && ($stored['author_xchan'] === $channel['channel_hash'])) { + retain_item($stored['item']['parent']); + } + fix_attached_photo_permissions($channel['channel_id'],$item['author_xchan'],$item['body'],$item['allow_cid'],$item['allow_gid'],$item['deny_cid'],$item['deny_gid']); fix_attached_file_permissions($channel,$item['author_xchan'],$item['body'],$item['allow_cid'],$item['allow_gid'],$item['deny_cid'],$item['deny_gid']); |