$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])) {
// "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 {
// 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']]);
}
if ($force) {
- Contact::updateFromProbe($contact_id, true);
+ Contact::updateFromProbe($contact_id, '', true);
}
$contact = DBA::selectFirst('contact', [], ['id' => $contact_id]);