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.

This commit is contained in:
zotlabs
2016-11-12 14:09:33 -08:00
parent 69509f2a2a
commit 640d15dba5
2 changed files with 225 additions and 205 deletions

View File

@@ -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 = '';