From e812836a601f5fda32b520e9af29f89ae2227524 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 18 Sep 2017 17:46:34 -0700 Subject: provide rel=alternate link if no reshare content in post --- include/feedutils.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/feedutils.php b/include/feedutils.php index 145d4361c..4cc194fb1 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -811,6 +811,7 @@ function feed_get_reshare(&$res,$item) { } $attach = $share['links']; + if($attach) { foreach($attach as $att) { if($att['rel'] === 'alternate') { @@ -845,6 +846,10 @@ function feed_get_reshare(&$res,$item) { } } + if((! $body) && ($share['alternate'])) { + $body = $share['alternate']; + } + $res['body'] = "[share author='" . urlencode($share['author']) . "' profile='" . $share['profile'] . "' avatar='" . $share['avatar'] . -- cgit v1.2.3 From 4fbebe7b2d6c38747986d18ea07db5b42c2a072a Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 18 Sep 2017 20:38:09 -0700 Subject: create new hooks for permissions_accept and permissions_reject --- Zotlabs/Daemon/Notifier.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index 0e8c99572..1b8a7d412 100644 --- a/Zotlabs/Daemon/Notifier.php +++ b/Zotlabs/Daemon/Notifier.php @@ -59,6 +59,8 @@ require_once('include/bbcode.php'); * * ZOT * permission_create abook_id + * permission_accept abook_id + * permission_reject abook_id * permission_update abook_id * refresh_all channel_id * purge_all channel_id @@ -171,8 +173,12 @@ class Notifier { if($channel) { $perm_update = array('sender' => $channel, 'recipient' => $r[0], 'success' => false, 'deliveries' => ''); - if($cmd == 'permission_create') + if($cmd === 'permission_create') call_hooks('permissions_create',$perm_update); + elseif($cmd === 'permission_accept') + call_hooks('permissions_accept',$perm_update); + elseif($cmd === 'permission_reject') + call_hooks('permissions_reject',$perm_update); else call_hooks('permissions_update',$perm_update); -- cgit v1.2.3 From c6bcea0f82a03657611621c338a6c01059ae8ec6 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 18 Sep 2017 21:55:45 -0700 Subject: pubcrawl: make a good faith effort to handle multi-media content --- include/feedutils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/feedutils.php b/include/feedutils.php index 4cc194fb1..112e10155 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -1711,7 +1711,7 @@ function compat_photos_list($s) { $found = preg_match_all('/\[[zi]mg(.*?)\](.*?)\[/ism',$s,$matches,PREG_SET_ORDER); if($found) { - foreach($matches as $match) { + foreach($matches as $match) { $ret[] = [ 'href' => $match[2], 'length' => 0, -- cgit v1.2.3