diff options
author | Mario <mario@mariovavti.com> | 2023-06-27 14:53:23 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-06-27 14:53:23 +0000 |
commit | 750641ef196d9e113b0e80da9734f70400b55652 (patch) | |
tree | ebfa9136bde34242294a4ae896e4b3ab7089286d /include | |
parent | fb48dfc08246d8f1eca2fa13b7c976bd29058693 (diff) | |
download | volse-hubzilla-750641ef196d9e113b0e80da9734f70400b55652.tar.gz volse-hubzilla-750641ef196d9e113b0e80da9734f70400b55652.tar.bz2 volse-hubzilla-750641ef196d9e113b0e80da9734f70400b55652.zip |
implement inline moderation of reactions
Diffstat (limited to 'include')
-rw-r--r-- | include/conversation.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/conversation.php b/include/conversation.php index 2f0b6f6fd..c02b0c4c8 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1215,11 +1215,16 @@ function builtin_activity_puller($item, &$conv_responses) { if((activity_match($item['verb'], $verb)) && ($item['id'] != $item['parent'])) { $name = (($item['author']['xchan_name']) ? $item['author']['xchan_name'] : t('Unknown')); + + $moderate = ((intval($item['item_blocked']) === ITEM_MODERATED) ? '<a href="moderate/' . $item['id'] . '/approve" onclick="moderate_approve(' . $item['id'] . '); return false;" class="text-success pe-2" title="' . t('Approve this item') . '"><i class="fa fa-check" ></i></a><a href="moderate/' . $item['id'] . '/drop" onclick="moderate_drop(' . $item['id'] . '); return false;" class="text-danger pe-2" title="' . t('Delete this item') . '"><i class="fa fa-trash-o" ></i></a>' : ''); + $url = (($item['author_xchan'] && $item['author']['xchan_photo_s']) - ? '<a class="dropdown-item" href="' . chanlink_hash($item['author_xchan']) . '">' . '<img class="menu-img-1" src="' . zid($item['author']['xchan_photo_s']) . '" alt="' . urlencode($name) . '" /> ' . $name . '</a>' + ? '<div class="dropdown-item">' . $moderate . '<a href="' . chanlink_hash($item['author_xchan']) . '" class="text-reset">' . '<img class="menu-img-1" src="' . zid($item['author']['xchan_photo_s']) . '" alt="' . urlencode($name) . '" /> ' . $name . '</a></div>' : '<a class="dropdown-item" href="#" class="disabled">' . $name . '</a>' ); + + if(! $item['thr_parent']) $item['thr_parent'] = $item['parent_mid']; |