Commit 98916667 authored by Penny Leach's avatar Penny Leach
Browse files

merged 82511f01e3adad3020063956be999e18f7d2ffd2 (wrapped notification

in a try/catch (eg in case email fails) and if it does fail, internal
messages don't get marked as read) from stable
parent 09c3f74d
......@@ -421,8 +421,14 @@ SELECT DISTINCT u.*, p.method, ?||wa.view AS url
if ($user->method != 'internal') {
$method = $user->method;
safe_require('notification', $method, 'lib.php', 'require_once');
call_static_method(generate_class_name('notification', $method), 'notify_user', $user, $userdata);
$user->markasread = true; // if we're doing something else, don't generate unread internal ones.
try {
call_static_method(generate_class_name('notification', $method), 'notify_user', $user, $userdata);
$user->markasread = true; // if we're doing something else, don't generate unread internal ones.
}
catch (Exception $e) {
$user->markasread = false; // if we fail (eg email falls over), don't mark it as read...
// @todo penny notify them that their notification type failed....
}
}
// always do internal
call_static_method('PluginNotificationInternal', 'notify_user', $user, $userdata);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment