aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2025-05-08 10:27:57 +0000
committerMario <mario@mariovavti.com>2025-05-08 10:27:57 +0000
commit918377a67b2e46f983281d6dec4f9732b977d6b5 (patch)
treee2477c5429baf2eb434413d62a02785b6c9690c4 /Zotlabs/Module
parent25e29ec544757d376c0eab4445c2450feec18101 (diff)
downloadvolse-hubzilla-918377a67b2e46f983281d6dec4f9732b977d6b5.tar.gz
volse-hubzilla-918377a67b2e46f983281d6dec4f9732b977d6b5.tar.bz2
volse-hubzilla-918377a67b2e46f983281d6dec4f9732b977d6b5.zip
provide commentable state and minor cleanup
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Request.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/Zotlabs/Module/Request.php b/Zotlabs/Module/Request.php
index daf063b5c..527ab0055 100644
--- a/Zotlabs/Module/Request.php
+++ b/Zotlabs/Module/Request.php
@@ -61,8 +61,10 @@ class Request extends Controller
$ret['result'] = item_activity_xchans($mid, $parent, $verb);
- // TODO: check permission to like
- if ($observer_hash) {
+ $commentable = $ret['result']['is_commentable'];
+ unset($ret['result']['is_commentable']);
+
+ if ($commentable) {
$ret['action'] = (($verb === 'Announce') ? 'jotShare' : 'dolike');
$ret['action_label'] = ((find_xchan_in_array($observer_hash, $ret['result'])) ? t('- Remove yours') : t('+ Add yours'));
}