aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
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
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')
-rw-r--r--Zotlabs/Lib/ThreadItem.php10
-rw-r--r--Zotlabs/Module/Request.php6
2 files changed, 6 insertions, 10 deletions
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php
index 6e81d6f44..afa341d45 100644
--- a/Zotlabs/Lib/ThreadItem.php
+++ b/Zotlabs/Lib/ThreadItem.php
@@ -114,7 +114,7 @@ class ThreadItem {
$locktype = intval($item['item_private']);
if ($locktype === 2) {
- $lock = t('Direct message');
+ $lock = t('Private message');
}
// 0 = limited based on public policy
@@ -285,14 +285,10 @@ class ThreadItem {
if((in_array($item['obj_type'], ['Event', ACTIVITY_OBJ_EVENT])) && $conv->get_profile_owner() == local_channel())
$has_event = true;
- $like = [];
- $dislike = [];
$reply_to = [];
$reactions_allowed = false;
if($this->is_commentable() && $observer) {
- $like = array( t("I like this \x28toggle\x29"), t("like"));
- $dislike = array( t("I don't like this \x28toggle\x29"), t("dislike"));
$reply_to = array( t("Reply to this message"), t("reply"), t("Reply to"));
$reactions_allowed = true;
}
@@ -439,8 +435,6 @@ class ThreadItem {
'reactions' => $this->reactions,
// Item toolbar buttons
'emojis' => (($this->is_toplevel() && $this->is_commentable() && $observer && feature_enabled($conv->get_profile_owner(),'emojis')) ? '1' : ''),
- 'like' => $like,
- 'dislike' => ((feature_enabled($conv->get_profile_owner(),'dislike')) ? $dislike : ''),
'reply_to' => ((feature_enabled($conv->get_profile_owner(),'reply_to')) ? $reply_to : ''),
'top_hint' => t("Go to previous comment"),
'share' => $share,
@@ -465,7 +459,7 @@ class ThreadItem {
'list_unseen_txt' => $list_unseen_txt,
'markseen' => t('Mark all comments seen'),
'responses' => $responses,
- 'my_responses' => $my_responses,
+ // 'my_responses' => $my_responses,
'modal_dismiss' => t('Close'),
'comment' => ($item['item_delayed'] ? '' : $this->get_comment_box()),
'comment_hidden' => feature_enabled($conv->get_profile_owner(),'reply_to'),
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'));
}