aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-21 20:05:54 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-21 20:05:54 -0700
commit9baaa6fa563525aac5e97822ec669a29310ff08b (patch)
tree99ea8d3d37db0859fc69d8b91f5d23d9e78fc5fc /include
parentd2565d0f61c139df6536ec9d90c10d7af29ef9e5 (diff)
downloadvolse-hubzilla-9baaa6fa563525aac5e97822ec669a29310ff08b.tar.gz
volse-hubzilla-9baaa6fa563525aac5e97822ec669a29310ff08b.tar.bz2
volse-hubzilla-9baaa6fa563525aac5e97822ec669a29310ff08b.zip
issue #51
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index 657168601..b209e55c5 100755
--- a/include/items.php
+++ b/include/items.php
@@ -4417,6 +4417,18 @@ function delete_item_lowlevel($item, $stage = DROPITEM_NORMAL, $force = false) {
intval($item['uid'])
);
+ // remove delivery reports
+
+ $c = q("select channel_hash from channel where channel_id = %d limit 1",
+ intval($item['uid'])
+ );
+ if($c) {
+ q("delete from dreport where dreport_xchan = '%s' and dreport_mid = '%s'",
+ dbesc($c[0]['channel_hash']),
+ dbesc($item['mid'])
+ );
+ }
+
// network deletion request. Keep the message structure so that we can deliver delete notifications.
// Come back after several days (or perhaps a month) to do the lowlevel delete (DROPITEM_PHASE2).