mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
Merge pull request #4015 from annando/archive-again
Don't archive "self" contacts
This commit is contained in:
commit
75c7dc0fa0
2 changed files with 12 additions and 4 deletions
|
@ -1157,6 +1157,14 @@ function item_set_last_item($arr) {
|
|||
Contact::unmarkForArchival($contact);
|
||||
}
|
||||
|
||||
// Unarchive the contact if it is a toplevel posting
|
||||
if ($arr["parent-uri"] === $arr["uri"]) {
|
||||
$contact = dba::select('contact', [], ['id' => $arr["contact-id"]], ['limit' => 1]);
|
||||
if ($contact['term-date'] > NULL_DATE) {
|
||||
Contact::unmarkForArchival($contact);
|
||||
}
|
||||
}
|
||||
|
||||
$update = (!$arr['private'] && (($arr["author-link"] === $arr["owner-link"]) || ($arr["parent-uri"] === $arr["uri"])));
|
||||
|
||||
// Is it a forum? Then we don't care about the rules from above
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue