aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Enotify.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-04-11 11:49:33 +0200
committerMario Vavti <mario@mariovavti.com>2018-04-11 11:49:33 +0200
commitfee258edbe0fe20b9c5ba66968fabe15699c6458 (patch)
tree9e9164680d629537ae6d629e2fc4699bdab24986 /Zotlabs/Lib/Enotify.php
parente294dfa7602d6283a776625167deeb84d11cf2e0 (diff)
downloadvolse-hubzilla-fee258edbe0fe20b9c5ba66968fabe15699c6458.tar.gz
volse-hubzilla-fee258edbe0fe20b9c5ba66968fabe15699c6458.tar.bz2
volse-hubzilla-fee258edbe0fe20b9c5ba66968fabe15699c6458.zip
allow to toggle visibility of likes/dislikes in notifications
Diffstat (limited to 'Zotlabs/Lib/Enotify.php')
-rw-r--r--Zotlabs/Lib/Enotify.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php
index 61c98c881..e05d391f3 100644
--- a/Zotlabs/Lib/Enotify.php
+++ b/Zotlabs/Lib/Enotify.php
@@ -115,6 +115,7 @@ class Enotify {
$always_show_in_notices = get_pconfig($recip['channel_id'],'system','always_show_in_notices');
+ $vnotify = get_pconfig($recip['channel_id'],'system','vnotify');
// e.g. "your post", "David's photo", etc.
$possess_desc = t('%s <!item_type!>');
@@ -142,7 +143,7 @@ class Enotify {
if(array_key_exists('item',$params) && in_array($params['item']['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) {
- if(! $always_show_in_notices) {
+ if(! $always_show_in_notices || !($vnotify & VNOTIFY_LIKE)) {
logger('notification: not a visible activity. Ignoring.');
pop_lang();
return;
@@ -249,7 +250,7 @@ class Enotify {
$itemlink = $params['link'];
if (array_key_exists('item',$params) && (! activity_match($params['item']['verb'],ACTIVITY_LIKE))) {
- if(! $always_show_in_notices) {
+ if(! $always_show_in_notices || !($vnotify & VNOTIFY_LIKE)) {
logger('notification: not a visible activity. Ignoring.');
pop_lang();
return;