kopia lustrzana https://github.com/nextcloud/social
rodzic
d7baae9735
commit
2dca0728e9
|
@ -30,6 +30,7 @@ declare(strict_types=1);
|
|||
namespace OCA\Social\Db;
|
||||
|
||||
|
||||
use daita\MySmallPhpTools\Exceptions\CacheItemNotFoundException;
|
||||
use daita\MySmallPhpTools\Traits\TArrayTools;
|
||||
use Doctrine\DBAL\Query\QueryBuilder;
|
||||
use OCA\Social\Exceptions\InvalidResourceException;
|
||||
|
@ -408,24 +409,21 @@ class StreamRequestBuilder extends CoreRequestBuilder {
|
|||
} catch (InvalidResourceException $e) {
|
||||
}
|
||||
|
||||
try {
|
||||
$action = $this->parseStreamActionsLeftJoin($data);
|
||||
if ($item->hasCache()) {
|
||||
$cache = $item->getCache();
|
||||
if ($cache->hasItem($action->getStreamId())) {
|
||||
$cachedItem = $item->getCache()
|
||||
->getItem($action->getStreamId());
|
||||
$cachedObject = $cachedItem->getObject();
|
||||
$cachedObject['action'] = $action;
|
||||
$cachedItem->setContent(json_encode($cachedObject));
|
||||
$cache->updateItem($cachedItem, false);
|
||||
}
|
||||
$action = $this->parseStreamActionsLeftJoin($data);
|
||||
if ($item->hasCache()) {
|
||||
$cache = $item->getCache();
|
||||
try {
|
||||
$cachedItem = $cache->getItem($action->getStreamId());
|
||||
$cachedObject = $cachedItem->getObject();
|
||||
$cachedObject['action'] = $action;
|
||||
$cachedItem->setContent(json_encode($cachedObject));
|
||||
$cache->updateItem($cachedItem, false);
|
||||
} catch (CacheItemNotFoundException $e) {
|
||||
}
|
||||
|
||||
$item->setAction($action);
|
||||
} catch (InvalidResourceException $e) {
|
||||
}
|
||||
|
||||
$item->setAction($action);
|
||||
|
||||
return $item;
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue