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:
@@ -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 = '';
|
||||
|
Reference in New Issue
Block a user