diff options
author | zotlabs <mike@macgirvin.com> | 2019-01-29 15:14:49 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2019-01-29 15:14:49 -0800 |
commit | b15421826d91d7344ad28a16f0be047c191d5ec4 (patch) | |
tree | 845e7dc1ab631fb7585b91221fac28cdb66334a4 /include/items.php | |
parent | 753f137575674a4fb1cfb16753baced6ed21145a (diff) | |
download | volse-hubzilla-b15421826d91d7344ad28a16f0be047c191d5ec4.tar.gz volse-hubzilla-b15421826d91d7344ad28a16f0be047c191d5ec4.tar.bz2 volse-hubzilla-b15421826d91d7344ad28a16f0be047c191d5ec4.zip |
cache embeds in the background on initial storage rather than on first access
Diffstat (limited to 'include/items.php')
-rwxr-xr-x | include/items.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php index ed6fee597..1fe98c119 100755 --- a/include/items.php +++ b/include/items.php @@ -2048,6 +2048,11 @@ function item_store($arr, $allow_exec = false, $deliver = true) { item_update_parent_commented($arr); + + if(strpos($arr['body'],'[embed]') !== false) { + Master::Summon([ 'Cache_embeds', $current_post ]); + } + // 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 @@ -2384,6 +2389,13 @@ function item_store_update($arr, $allow_exec = false, $deliver = true) { */ call_hooks('item_stored_update',$arr); + if(strpos($arr['body'],'[embed]') !== false) { + Master::Summon([ 'Cache_embeds', $orig_post_id ]); + } + + + + if($deliver) { send_status_notifications($orig_post_id,$arr); tag_deliver($uid,$orig_post_id); |