]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #7924 from annando/issue-7691
authorHypolite Petovan <hypolite@mrpetovan.com>
Tue, 10 Dec 2019 13:36:07 +0000 (08:36 -0500)
committerGitHub <noreply@github.com>
Tue, 10 Dec 2019 13:36:07 +0000 (08:36 -0500)
Issue 7691: We can now switch to BCC for ActivityPub

src/Model/Contact.php
src/Model/Item.php
src/Worker/OnePoll.php

index e48579470942516330e129f4f1554a4877d18c39..76c9cd01692f590760395616640682e3d4af3c4b 100644 (file)
@@ -2332,7 +2332,7 @@ class Contact extends BaseObject
                        $apcontact = APContact::getByURL($url, false);
                        if (isset($apcontact['manually-approve'])) {
                                $pending = (bool)$apcontact['manually-approve'];
-                       }                       
+                       }
                }
 
                if (in_array($protocol, [Protocol::MAIL, Protocol::DIASPORA, Protocol::ACTIVITYPUB])) {
index 1e3b16002a0e63740f7486a36357bed317208ab6..5427ff44b3e5bf046927ba23bb3a9178ee4dfbfd 100644 (file)
@@ -1083,6 +1083,9 @@ class Item extends BaseObject
                        // "Deleting" global items just means hiding them
                        if ($item['uid'] == 0) {
                                DBA::update('user-item', ['hidden' => true], ['iid' => $item['id'], 'uid' => $uid], true);
+
+                               // Delete notifications
+                               DBA::delete('notify', ['iid' => $item['id'], 'uid' => $uid]);
                        } elseif ($item['uid'] == $uid) {
                                self::deleteById($item['id'], PRIORITY_HIGH);
                        } else {
@@ -1173,6 +1176,9 @@ class Item extends BaseObject
                // Delete tags that had been attached to other items
                self::deleteTagsFromItem($item);
 
+               // Delete notifications
+               DBA::delete('notify', ['iid' => $item['id'], 'uid' => $item['uid']]);
+
                // Set the item to "deleted"
                $item_fields = ['deleted' => true, 'edited' => DateTimeFormat::utcNow(), 'changed' => DateTimeFormat::utcNow()];
                DBA::update('item', $item_fields, ['id' => $item['id']]);
index 25402e3c3158d2890833656a71ca2efe16236171..3dbc0cccd1cd06c3ebd8e481862b65d6c8f4fc75 100644 (file)
@@ -41,7 +41,7 @@ class OnePoll
                }
 
                if ($force) {
-                       Contact::updateFromProbe($contact_id, true);
+                       Contact::updateFromProbe($contact_id, '', true);
                }
 
                $contact = DBA::selectFirst('contact', [], ['id' => $contact_id]);