aboutsummaryrefslogtreecommitdiffstats
path: root/include/import.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-07-11 16:11:52 +0200
committerMario Vavti <mario@mariovavti.com>2017-07-11 16:11:52 +0200
commit403e90861cccecc3179e380b084238e1294fe61e (patch)
treea14f7f3710f729fb91bc2242781cc7b2623b68aa /include/import.php
parent271ed82d0def7b658f074ada9adb1aaa51bdd507 (diff)
parent2d63bbb91e97d3a54440564620ef3093ecbe71fb (diff)
downloadvolse-hubzilla-403e90861cccecc3179e380b084238e1294fe61e.tar.gz
volse-hubzilla-403e90861cccecc3179e380b084238e1294fe61e.tar.bz2
volse-hubzilla-403e90861cccecc3179e380b084238e1294fe61e.zip
Merge red/master
Diffstat (limited to 'include/import.php')
-rw-r--r--include/import.php8
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']);