aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-01-22 11:58:12 -0800
committerzotlabs <mike@macgirvin.com>2018-01-22 11:58:12 -0800
commitdeede8e2ddb58db0bedf437f25c56c9fc050f181 (patch)
treef87c01f83284d5d54e58d6450e7b756795f14b90 /Zotlabs
parentc994f26dbd8151bd1e937dbb13d3ae416740fdd9 (diff)
parentf85c6d76de5532e62f95de3f4d814109ea3472f9 (diff)
downloadvolse-hubzilla-deede8e2ddb58db0bedf437f25c56c9fc050f181.tar.gz
volse-hubzilla-deede8e2ddb58db0bedf437f25c56c9fc050f181.tar.bz2
volse-hubzilla-deede8e2ddb58db0bedf437f25c56c9fc050f181.zip
Merge branch 'dev'
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Enotify.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php
index a7b4f28e8..5cf4ec31d 100644
--- a/Zotlabs/Lib/Enotify.php
+++ b/Zotlabs/Lib/Enotify.php
@@ -794,6 +794,20 @@ class Enotify {
: sprintf( t('commented on %s\'s post'), $item['owner']['xchan_name']));
}
+ $edit = false;
+
+ if($item['edited'] > $item['created']) {
+ if($item['item_thread_top']) {
+ $itemem_text = sprintf( t('edited a post dated %s'), relative_date($item['created']));
+ $edit = true;
+ }
+ else {
+ $itemem_text = sprintf( t('edited a comment dated %s'), relative_date($item['created']));
+ $edit = true;
+ }
+ }
+
+
// convert this logic into a json array just like the system notifications
return array(
@@ -801,7 +815,7 @@ class Enotify {
'name' => $item['author']['xchan_name'],
'url' => $item['author']['xchan_url'],
'photo' => $item['author']['xchan_photo_s'],
- 'when' => relative_date($item['created']),
+ 'when' => relative_date(($edit)? $item['edited'] : $item['created']),
'class' => (intval($item['item_unseen']) ? 'notify-unseen' : 'notify-seen'),
'b64mid' => ((in_array($item['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) ? 'b64.' . base64url_encode($item['thr_parent']) : 'b64.' . base64url_encode($item['mid'])),
'notify_id' => 'undefined',