aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-02-03 19:09:15 +0000
committerMario <mario@mariovavti.com>2022-02-03 19:09:15 +0000
commit25424c16e41dc4773a7464129cac7a9acd4667dc (patch)
tree449e6a995e317a357317ea9383968c2cbc34a7ac /Zotlabs/Module
parent99dcdee67ab3521bd3e5e58ba4a85182b7a44890 (diff)
downloadvolse-hubzilla-25424c16e41dc4773a7464129cac7a9acd4667dc.tar.gz
volse-hubzilla-25424c16e41dc4773a7464129cac7a9acd4667dc.tar.bz2
volse-hubzilla-25424c16e41dc4773a7464129cac7a9acd4667dc.zip
unpack encoded mid and make sure to goaway to the right message
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Search.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/Zotlabs/Module/Search.php b/Zotlabs/Module/Search.php
index 5db0ce423..1df45233c 100644
--- a/Zotlabs/Module/Search.php
+++ b/Zotlabs/Module/Search.php
@@ -58,10 +58,22 @@ class Search extends Controller {
$o .= search($search, 'search-box', '/search', ((local_channel()) ? true : false));
if (local_channel() && strpos($search, 'https://') === 0 && !$update && !$load) {
+ if (strpos($search, 'b64.') !== false) {
+ $search = unpack_link_id(basename($search));
+ }
+
$f = Libzot::fetch_conversation(App::get_channel(), punify($search), true);
if ($f) {
- goaway(z_root() . '/hq/' . gen_link_id($f['message_id']));
+ $mid = $f[0]['message_id'];
+ foreach ($f as $m) {
+ if (strpos($search, $m['message_id']) === 0) {
+ $mid = $m['message_id'];
+ break;
+ }
+ }
+
+ goaway(z_root() . '/hq/' . gen_link_id($mid));
}
else {
// try other fetch providers (e.g. diaspora, pubcrawl)