diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-02-13 12:04:48 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-02-13 12:04:48 +0100 |
commit | d2dcb93866ea659ac6fabc34b301656d8d5def8c (patch) | |
tree | baebddb4c6eda3bc8db874e15496e07b2d1d636e /Zotlabs/Lib/Enotify.php | |
parent | d826515ba8d2d1d78abed6701df3c2c3550e87df (diff) | |
download | volse-hubzilla-d2dcb93866ea659ac6fabc34b301656d8d5def8c.tar.gz volse-hubzilla-d2dcb93866ea659ac6fabc34b301656d8d5def8c.tar.bz2 volse-hubzilla-d2dcb93866ea659ac6fabc34b301656d8d5def8c.zip |
match against item verb
Diffstat (limited to 'Zotlabs/Lib/Enotify.php')
-rw-r--r-- | Zotlabs/Lib/Enotify.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php index 5820c8b0c..f48b694fc 100644 --- a/Zotlabs/Lib/Enotify.php +++ b/Zotlabs/Lib/Enotify.php @@ -130,7 +130,7 @@ class Enotify { } if ($params['type'] == NOTIFY_COMMENT) { -// logger("notification: params = " . print_r($params, true), LOGGER_DEBUG); + //logger("notification: params = " . print_r($params, true), LOGGER_DEBUG); $moderated = (($params['item']['item_blocked'] == ITEM_MODERATED) ? true : false); @@ -138,7 +138,7 @@ class Enotify { $action = 'commented on'; - if(array_key_exists('item',$params) && (! visible_activity($params['item']))) { + if(array_key_exists('item',$params) && in_array($params['item']['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) { if(! $always_show_in_notices) { logger('notification: not a visible activity. Ignoring.'); @@ -146,10 +146,10 @@ class Enotify { return; } - if(activity_match($params['item']['verb'], ACTIVITY_LIKE)) + if(activity_match($params['verb'], ACTIVITY_LIKE)) $action = 'liked'; - if(activity_match($params['item']['verb'], ACTIVITY_DISLIKE)) + if(activity_match($params['verb'], ACTIVITY_DISLIKE)) $action = 'disliked'; } |