aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-02-07 14:25:25 -0800
committerzotlabs <mike@macgirvin.com>2019-02-07 14:25:25 -0800
commitf02af5fe6ea9e86a99e6e1ae5a7057350bb7224a (patch)
treedccfb26b10e86fb7c9e89a3f1d20ab64bcb7f464 /Zotlabs/Module
parent92e6c21210b71acb2e1071171fa8cd7e76640f7b (diff)
downloadvolse-hubzilla-f02af5fe6ea9e86a99e6e1ae5a7057350bb7224a.tar.gz
volse-hubzilla-f02af5fe6ea9e86a99e6e1ae5a7057350bb7224a.tar.bz2
volse-hubzilla-f02af5fe6ea9e86a99e6e1ae5a7057350bb7224a.zip
automatically redirect repeat to share for posts with unresolvable message-ids (diaspora, hz < 4.0, etc.).
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Share.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/Zotlabs/Module/Share.php b/Zotlabs/Module/Share.php
index dcb2343ce..cca72f12f 100644
--- a/Zotlabs/Module/Share.php
+++ b/Zotlabs/Module/Share.php
@@ -27,13 +27,15 @@ class Share extends \Zotlabs\Web\Controller {
$channel = App::get_channel();
-
$r = q("SELECT * from item left join xchan on author_xchan = xchan_hash WHERE id = %d LIMIT 1",
intval($post_id)
);
if(! $r)
killme();
+
+
+
if(($r[0]['item_private']) && ($r[0]['xchan_network'] !== 'rss'))
killme();
@@ -49,8 +51,12 @@ class Share extends \Zotlabs\Web\Controller {
if($r[0]['mimetype'] !== 'text/bbcode')
killme();
-
-
+
+ if(strpos($r[0]['mid'],'http') === false) {
+ notice( t('Source message cannot be repeated. Sharing instead.') . EOL);
+ goaway(z_root() . '/embed/' . argv(1));
+ }
+
xchan_query($r);
$arr = [];