aboutsummaryrefslogtreecommitdiffstats
path: root/include/enotify.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-08-15 14:42:14 -0700
committerfriendica <info@friendica.com>2014-08-15 14:42:14 -0700
commit481263dc252a0a3d02971e7f30668f4cdb662835 (patch)
tree061ca800d918a62cb5c424d2f1c586d11b5f2665 /include/enotify.php
parent42863896546d5638bedeb034d5c1001d1f0f35a8 (diff)
downloadvolse-hubzilla-481263dc252a0a3d02971e7f30668f4cdb662835.tar.gz
volse-hubzilla-481263dc252a0a3d02971e7f30668f4cdb662835.tar.bz2
volse-hubzilla-481263dc252a0a3d02971e7f30668f4cdb662835.zip
bring back some friendica crypto stuff including all the key mangling and translation functions. Also add ability to completely supress email notifications for actitivies with private contents. We'll still pass private mail notifications because often the email notification is the only way infrequently used channels get alerted to these.
Diffstat (limited to 'include/enotify.php')
-rw-r--r--include/enotify.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/enotify.php b/include/enotify.php
index b0f6b4823..2503f9ab0 100644
--- a/include/enotify.php
+++ b/include/enotify.php
@@ -461,6 +461,8 @@ function notification($params) {
// Might be interesting to use GPG,PGP,S/MIME encryption instead
// but we'll save that for a clever plugin developer to implement
+ $private_activity = false;
+
if(! $datarray['email_secure']) {
switch($params['type']) {
case NOTIFY_WALL:
@@ -469,6 +471,7 @@ function notification($params) {
case NOTIFY_COMMENT:
if(! $private)
break;
+ $private_activity = true;
case NOTIFY_MAIL:
$datarray['textversion'] = $datarray['htmlversion'] = $datarray['title'] = '';
$datarray['subject'] = preg_replace('/' . preg_quote(t('[Red:Notify]')) . '/','$0*',$datarray['subject']);
@@ -478,6 +481,12 @@ function notification($params) {
}
}
+ if($private_activity
+ && intval(get_pconfig($datarray['uid'],'system','ignore_private_notifications'))) {
+ pop_lang();
+ return;
+ }
+
// load the template for private message notifications
$tpl = get_markup_template('email_notify_html.tpl');
$email_html_body = replace_macros($tpl,array(