aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2025-05-07 12:31:47 +0000
committerMario <mario@mariovavti.com>2025-05-07 12:31:47 +0000
commitac5d22d514390032ebb2244b26c6445f4b640811 (patch)
tree5912dd2754f76d3e82982fe2407ad7390c417fb3 /Zotlabs/Module
parent21279b7d4e372abfe906389c9112810faa3ace64 (diff)
downloadvolse-hubzilla-ac5d22d514390032ebb2244b26c6445f4b640811.tar.gz
volse-hubzilla-ac5d22d514390032ebb2244b26c6445f4b640811.tar.bz2
volse-hubzilla-ac5d22d514390032ebb2244b26c6445f4b640811.zip
refactor doreply() and move reply functionality to modal
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Item.php2
-rw-r--r--Zotlabs/Module/Request.php9
2 files changed, 8 insertions, 3 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php
index adb39985c..e164d6be3 100644
--- a/Zotlabs/Module/Item.php
+++ b/Zotlabs/Module/Item.php
@@ -108,6 +108,7 @@ class Item extends Controller {
*/
$parent = ((!empty($_POST['parent'])) ? intval($_POST['parent']) : 0);
+ $thr_parent_id = $parent;
$parent_mid = ((!empty($_POST['parent_mid'])) ? trim($_POST['parent_mid']) : '');
$mode = ((isset($_POST['conv_mode']) && $_POST['conv_mode'] === 'channel') ? 'channel' : 'network');
@@ -1218,6 +1219,7 @@ class Item extends Controller {
$json = [
'success' => 1,
'id' => $post_id,
+ 'thr_parent_id' => $thr_parent_id,
'html' => conversation($item, $mode, true, 'r_preview'),
];
diff --git a/Zotlabs/Module/Request.php b/Zotlabs/Module/Request.php
index b6ff7dd4d..abe8d74c5 100644
--- a/Zotlabs/Module/Request.php
+++ b/Zotlabs/Module/Request.php
@@ -35,6 +35,7 @@ class Request extends Controller
xchan_query($items);
$items = fetch_post_tags($items,true);
+
$ret['html'] = conversation($items, $module, true, 'r_preview');
json_return_and_die($ret);
@@ -53,13 +54,13 @@ class Request extends Controller
killme();
}
+ $text = get_response_button_text($_GET['verb']);
$mid = strip_tags($_GET['mid']);
$parent = intval($_GET['parent']);
$observer_hash = get_observer_hash();
- $ret = [
- 'result' => item_activity_xchans($mid, $parent, $verb)
- ];
+
+ $ret['result'] = item_activity_xchans($mid, $parent, $verb);
// TODO: check permission to like
if ($observer_hash) {
@@ -67,6 +68,8 @@ class Request extends Controller
$ret['action_label'] = ((find_xchan_in_array($observer_hash, $ret['result'])) ? t('- Remove yours') : t('+ Add yours'));
}
+ $ret['title'] = $text['label'];
+
json_return_and_die($ret);
}