diff options
author | zotlabs <mike@macgirvin.com> | 2016-11-12 14:09:33 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2016-11-12 14:09:33 -0800 |
commit | 640d15dba548533fbda5d73d04db8f6896197026 (patch) | |
tree | 050301e7d2f9d3d8d03811186fc220d437cd0bc4 /Zotlabs | |
parent | 69509f2a2aee10492a67c1de54c5e6682ecba42d (diff) | |
download | volse-hubzilla-640d15dba548533fbda5d73d04db8f6896197026.tar.gz volse-hubzilla-640d15dba548533fbda5d73d04db8f6896197026.tar.bz2 volse-hubzilla-640d15dba548533fbda5d73d04db8f6896197026.zip |
don't send notification for posts/comments on old conversations that were refetched after having expired. We'll accomplish this by limiting notifications to items posted within the last month.
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Lib/Enotify.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php index ffe2f0950..b6f4d3351 100644 --- a/Zotlabs/Lib/Enotify.php +++ b/Zotlabs/Lib/Enotify.php @@ -102,6 +102,10 @@ class Enotify { $title = $params['item']['title']; $body = $params['item']['body']; } + if($item['created'] < datetime_convert('UTC','UTC','now - 1 month')) { + logger('notification invoked for an old item which may have been refetched.',LOGGER_DEBUG,LOG_INFO); + return; + } } else { $title = $body = ''; |