aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Lib/Activity.php12
-rw-r--r--Zotlabs/Lib/Enotify.php13
-rw-r--r--Zotlabs/Module/Hq.php7
-rw-r--r--view/tpl/search_item.tpl13
4 files changed, 28 insertions, 17 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 433024cf0..e2618625f 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -1591,10 +1591,17 @@ class Activity {
}
if (in_array($observer, [$r[0]['author_xchan'], $r[0]['owner_xchan']])) {
- drop_item($r[0]['id'], false);
+ drop_item($r[0]['id'], false, (($r[0]['item_wall']) ? DROPITEM_PHASE1 : DROPITEM_NORMAL));
} elseif (in_array($act->actor['id'], [$r[0]['author_xchan'], $r[0]['owner_xchan']])) {
- drop_item($r[0]['id'], false);
+ drop_item($r[0]['id'], false, (($r[0]['item_wall']) ? DROPITEM_PHASE1 : DROPITEM_NORMAL));
}
+
+ sync_an_item($channel['channel_id'], $r[0]['id']);
+
+ if ($r[0]['item_wall']) {
+ Master::Summon(['Notifier', 'drop', $r[0]['id']]);
+ }
+
}
@@ -2970,7 +2977,6 @@ class Activity {
}*/
if (!$allowed) {
-
if (get_pconfig($channel['channel_id'], 'system', 'moderate_unsolicited_comments')) {
$item['item_blocked'] = intval(ITEM_MODERATED);
$allowed = true;
diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php
index a8d34b940..1eb05da08 100644
--- a/Zotlabs/Lib/Enotify.php
+++ b/Zotlabs/Lib/Enotify.php
@@ -158,10 +158,10 @@ class Enotify {
}
if(activity_match($params['verb'], ACTIVITY_LIKE))
- $action = t('liked');
+ $action = (($moderated) ? t('requests to like') : t('liked'));
if(activity_match($params['verb'], ACTIVITY_DISLIKE))
- $action = t('disliked');
+ $action = (($moderated) ? t('requests to dislike') : t('disliked'));
}
@@ -307,7 +307,14 @@ class Enotify {
$parent_item = $p[0];
- $verb = ((activity_match($params['item']['verb'], ACTIVITY_DISLIKE)) ? t('disliked') : t('liked'));
+ //$verb = ((activity_match($params['item']['verb'], ACTIVITY_DISLIKE)) ? t('disliked') : t('liked'));
+ $moderated = (($params['item']['item_blocked'] == ITEM_MODERATED) ? true : false);
+
+ if(activity_match($params['item']['verb'], ACTIVITY_LIKE))
+ $verb = (($moderated) ? t('requests to like') : t('liked'));
+
+ if(activity_match($params['item']['verb'], ACTIVITY_DISLIKE))
+ $verb = (($moderated) ? t('requests to dislike') : t('disliked'));
// "your post"
if($p[0]['owner']['xchan_name'] === $p[0]['author']['xchan_name'] && intval($p[0]['item_wall']))
diff --git a/Zotlabs/Module/Hq.php b/Zotlabs/Module/Hq.php
index efa13b832..260d0c41b 100644
--- a/Zotlabs/Module/Hq.php
+++ b/Zotlabs/Module/Hq.php
@@ -67,9 +67,10 @@ class Hq extends \Zotlabs\Web\Controller {
}
}
- //if the item is to be moderated redirect to /moderate
- if($target_item['item_blocked'] == ITEM_MODERATED) {
- // goaway(z_root() . '/moderate/' . $target_item['id']);
+ // if the item is to be moderated redirect to /moderate
+ // comments can be moderated inline
+ if(intval($target_item['item_blocked']) === ITEM_MODERATED && in_array($target_item['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE, ACTIVITY_ATTEND, ACTIVITY_ATTENDMAYBE, ACTIVITY_ATTENDNO])) {
+ goaway(z_root() . '/moderate/' . $target_item['id']);
}
$simple_update = '';
diff --git a/view/tpl/search_item.tpl b/view/tpl/search_item.tpl
index b2a99b64a..da5bac5dc 100644
--- a/view/tpl/search_item.tpl
+++ b/view/tpl/search_item.tpl
@@ -107,6 +107,10 @@
<div class="spinner s"></div>
</div>
</div>
+ {{if $item.mode === 'moderate'}}
+ <a href="moderate/{{$item.id}}/approve" class="btn btn-outline-success btn-sm">{{$item.approve}}</a>
+ <a href="moderate/{{$item.id}}/drop" class="btn btn-outline-danger btn-sm">{{$item.delete}}</a>
+ {{else}}
{{if $item.star || $item.thread_action_menu || $item.drop.dropping}}
<div class="btn-group">
<button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-bs-toggle="dropdown">
@@ -127,6 +131,7 @@
</div>
</div>
{{/if}}
+ {{/if}}
</div>
{{if $item.star && $item.star.isstarred}}
<div class="btn-group" id="star-button-{{$item.id}}">
@@ -139,14 +144,6 @@
<div class="dropdown-menu">{{$item.attachments}}</div>
</div>
{{/if}}
-
- <div class="wall-item-tools-left btn-group" id="wall-item-tools-left-{{$item.id}}">
- {{if $item.mode === 'moderate'}}
- <a href="moderate/{{$item.id}}/approve" class="btn btn-success btn-sm">{{$item.approve}}</a>
- <a href="moderate/{{$item.id}}/drop" class="btn btn-danger btn-sm">{{$item.delete}}</a>
- {{/if}}
- </div>
-
</div>
</div>
{{if $item.conv}}