diff options
author | friendica <info@friendica.com> | 2015-02-11 15:26:35 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-02-11 15:26:35 -0800 |
commit | 8c061f143f7e019fdea3a2a03d96fc4ec8e39edd (patch) | |
tree | b1785617fc94741f93b8b41116fc5c538c2de5da /include/items.php | |
parent | 3f76cbf40b57b34f32a64435ca125c0576985c34 (diff) | |
download | volse-hubzilla-8c061f143f7e019fdea3a2a03d96fc4ec8e39edd.tar.gz volse-hubzilla-8c061f143f7e019fdea3a2a03d96fc4ec8e39edd.tar.bz2 volse-hubzilla-8c061f143f7e019fdea3a2a03d96fc4ec8e39edd.zip |
more efficient processing of response activities, plus a proof of concept fix for the problem of receiving a delete notification before we actually get the item which we're supposed to delete.
Diffstat (limited to 'include/items.php')
-rwxr-xr-x | include/items.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php index 2207635b6..de69a0f81 100755 --- a/include/items.php +++ b/include/items.php @@ -2280,9 +2280,16 @@ function item_store($arr,$allow_exec = false) { ); - send_status_notifications($current_post,$arr); + // If _creating_ a deleted item, don't propagate it further or send out notifications. + // We need to store the item details just in case the delete came in before the original post, + // so that we have an item in the DB that's marked deleted and won't store a fresh post + // that isn't aware that we were already told to delete it. + + if(! ($arr['item_restrict'] & ITEM_DELETED)) { + send_status_notifications($current_post,$arr); + tag_deliver($arr['uid'],$current_post); + } - tag_deliver($arr['uid'],$current_post); $ret['success'] = true; $ret['item_id'] = $current_post; |