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.

This commit is contained in:
friendica
2015-02-11 15:26:35 -08:00
parent 3f76cbf40b
commit 8c061f143f
3 changed files with 59 additions and 19 deletions

View File

@@ -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;