aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-01-22 10:11:27 +0000
committerMario <mario@mariovavti.com>2021-01-22 10:11:27 +0000
commit064effe5fd861be2623c7bd1f8a6037e6d470c29 (patch)
tree33b606d3e793685f926071177ccc77adaba2b68c
parent93ac3c985fd35a9826c5421360da368ff07dd315 (diff)
downloadvolse-hubzilla-064effe5fd861be2623c7bd1f8a6037e6d470c29.tar.gz
volse-hubzilla-064effe5fd861be2623c7bd1f8a6037e6d470c29.tar.bz2
volse-hubzilla-064effe5fd861be2623c7bd1f8a6037e6d470c29.zip
fix encode_item_collection()
-rw-r--r--Zotlabs/Lib/Activity.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index d552a9b3c..197409a19 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -267,7 +267,7 @@ class Activity {
static function encode_item_collection($items, $id, $type, $total = 0) {
- if ($total > 100) {
+ if ($total > 30) {
$ret = [
'id' => z_root() . '/' . $id,
'type' => $type . 'Page',
@@ -300,11 +300,17 @@ class Activity {
$x = [];
foreach ($items as $i) {
$m = get_iconfig($i['id'], 'activitypub', 'rawmsg');
- if (is_string($m)) {
- $t = json_decode($m, true);
+ if ($m) {
+ if (is_string($m))
+ $t = json_decode($m,true);
+ else
+ $t = $m;
}
else {
- $t = $m;
+ $t = self::encode_activity($i);
+ }
+ if ($t) {
+ $x[] = $t;
}
if ($t) {
$x[] = $t;