aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r--Zotlabs/Lib/Activity.php7
-rw-r--r--Zotlabs/Lib/Apps.php4
-rw-r--r--Zotlabs/Lib/Connect.php4
-rw-r--r--Zotlabs/Lib/Libsync.php9
4 files changed, 16 insertions, 8 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 963a8ff75..9dbb15c28 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -545,6 +545,7 @@ class Activity {
call_hooks('encode_item', $hookinfo);
+
return $hookinfo['encoded'];
}
@@ -821,8 +822,12 @@ class Activity {
}
$ret['published'] = ((isset($i['created'])) ? datetime_convert('UTC', 'UTC', $i['created'], ATOM_TIME) : datetime_convert());
- if (isset($i['created'], $i['edited']) && $i['created'] !== $i['edited'])
+ if (isset($i['created'], $i['edited']) && $i['created'] !== $i['edited']) {
$ret['updated'] = datetime_convert('UTC', 'UTC', $i['edited'], ATOM_TIME);
+ if ($ret['type'] === 'Create') {
+ $ret['type'] = 'Update';
+ }
+ }
if (isset($i['app']) && $i['app']) {
$ret['generator'] = ['type' => 'Application', 'name' => $i['app']];
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php
index a9c7d0a2a..497a9d299 100644
--- a/Zotlabs/Lib/Apps.php
+++ b/Zotlabs/Lib/Apps.php
@@ -605,8 +605,8 @@ class Apps {
'$deleted' => $papp['deleted'] ?? false,
'$feature' => ((isset($papp['embed']) || $mode == 'edit') ? false : true),
'$pin' => ((isset($papp['embed']) || $mode == 'edit') ? false : true),
- '$featured' => ((isset($papp['categories']) && strpos($papp['categories'], 'nav_featured_app') === false) ? false : true),
- '$pinned' => ((isset($papp['categories']) && strpos($papp['categories'], 'nav_pinned_app') === false) ? false : true),
+ '$featured' => ((isset($papp['categories']) && strpos($papp['categories'], 'nav_featured_app') !== false) ? true : false),
+ '$pinned' => ((isset($papp['categories']) && strpos($papp['categories'], 'nav_pinned_app') !== false) ? true : false),
'$mode' => $mode,
'$add' => t('Add to app-tray'),
'$remove' => t('Remove from app-tray'),
diff --git a/Zotlabs/Lib/Connect.php b/Zotlabs/Lib/Connect.php
index 4570627fc..802bbe0f5 100644
--- a/Zotlabs/Lib/Connect.php
+++ b/Zotlabs/Lib/Connect.php
@@ -109,10 +109,12 @@ class Connect {
if ($wf || $d) {
+ $xchan_hash = (($wf) ? $wf : $url);
+
// something was discovered - find the record which was just created.
$r = q("select * from xchan where ( xchan_hash = '%s' or xchan_url = '%s' or xchan_addr = '%s' ) $sql_options",
- dbesc($wf ?? $url),
+ dbesc($xchan_hash),
dbesc($url),
dbesc($url)
);
diff --git a/Zotlabs/Lib/Libsync.php b/Zotlabs/Lib/Libsync.php
index 9851ce52a..fd9886f71 100644
--- a/Zotlabs/Lib/Libsync.php
+++ b/Zotlabs/Lib/Libsync.php
@@ -192,7 +192,10 @@ class Libsync {
dbesc($sender)
);
- $DR = new DReport(z_root(), $sender, $d, 'sync');
+ $mid = 'sync';
+
+
+ $DR = new DReport(z_root(), $sender, $d, $mid);
if (!$r) {
$DR->update('recipient not found');
@@ -202,7 +205,6 @@ class Libsync {
$channel = $r[0];
- $mid = 'sync';
$DR->set_name($channel['channel_name'] . ' <' . channel_reddress($channel) . '>');
@@ -297,7 +299,7 @@ class Libsync {
if (array_key_exists('item', $arr) && $arr['item']) {
sync_items($channel, $arr['item'], ((array_key_exists('relocate', $arr)) ? $arr['relocate'] : null));
- $mid = $arr['item']['mid'] . '#sync';
+ $mid = $arr['item'][0]['message_id'] . '#sync';
}
// deprecated, maintaining for a few months for upward compatibility
@@ -750,7 +752,6 @@ class Libsync {
$result[] = $DR->get();
}
-
return $result;
}