aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Enotify.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Lib/Enotify.php')
-rw-r--r--Zotlabs/Lib/Enotify.php30
1 files changed, 20 insertions, 10 deletions
diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php
index 85e90d67c..f706b0fb9 100644
--- a/Zotlabs/Lib/Enotify.php
+++ b/Zotlabs/Lib/Enotify.php
@@ -143,19 +143,26 @@ class Enotify {
$action = t('commented on');
- if(array_key_exists('item',$params) && in_array($params['item']['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) {
+ if(array_key_exists('item',$params)) {
- if(! $always_show_in_notices || !($vnotify & VNOTIFY_LIKE)) {
- logger('notification: not a visible activity. Ignoring.');
- pop_lang();
- return;
- }
+ if(in_array($params['item']['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) {
+
+ if(! $always_show_in_notices || !($vnotify & VNOTIFY_LIKE)) {
+ logger('notification: not a visible activity. Ignoring.');
+ pop_lang();
+ return;
+ }
- if(activity_match($params['verb'], ACTIVITY_LIKE))
- $action = t('liked');
+ if(activity_match($params['verb'], ACTIVITY_LIKE))
+ $action = t('liked');
- if(activity_match($params['verb'], ACTIVITY_DISLIKE))
- $action = t('disliked');
+ if(activity_match($params['verb'], ACTIVITY_DISLIKE))
+ $action = t('disliked');
+
+ }
+
+ if($params['item']['obj_type'] === 'Answer')
+ $action = t('voted on');
}
@@ -818,6 +825,9 @@ class Enotify {
$itemem_text = sprintf( t('repeated %s\'s post'), '[bdi]' . $item['author']['xchan_name'] . '[/bdi]');
}
+ if(in_array($item['obj_type'], ['Document', 'Video', 'Audio', 'Image'])) {
+ $itemem_text = t('shared a file with you');
+ }
}
$edit = false;