aboutsummaryrefslogtreecommitdiffstats
path: root/include/photo
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2020-09-09 11:11:52 +0200
committerMax Kostikov <max@kostikov.co>2020-09-09 11:11:52 +0200
commitdf758f40efdeb271d1e9086644ffba6b8fd10055 (patch)
tree002c74d07712ba108a6425b662aa2e9bff7ad8c2 /include/photo
parent1d8dd949dcc07312cd741d517f6d852fc8def60a (diff)
downloadvolse-hubzilla-df758f40efdeb271d1e9086644ffba6b8fd10055.tar.gz
volse-hubzilla-df758f40efdeb271d1e9086644ffba6b8fd10055.tar.bz2
volse-hubzilla-df758f40efdeb271d1e9086644ffba6b8fd10055.zip
Avoid photo profile fetching more than once every 1 min
Diffstat (limited to 'include/photo')
-rw-r--r--include/photo/photo_driver.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php
index 495008a22..79d4e10bf 100644
--- a/include/photo/photo_driver.php
+++ b/include/photo/photo_driver.php
@@ -238,6 +238,8 @@ function import_xchan_photo($photo, $xchan, $thing = false, $force = false) {
if(array_key_exists('expires', $hdrs))
$expires = strtotime($hdrs['expires']);
+ if($expires - 60 < time())
+ $expires = time() + 60;
else {
$cc = '';
if(array_key_exists('cache-control', $hdrs))