aboutsummaryrefslogtreecommitdiffstats
path: root/include/enotify.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-11-20 21:09:13 -0800
committerfriendica <info@friendica.com>2013-11-20 21:09:13 -0800
commit4791b2fd9c6dabc9ebb1f42a4993185d85493261 (patch)
tree4a63752ec22345dabc3e8d07c483046c91547a98 /include/enotify.php
parenteb3d8e2cd7e2bd51035918b4106d1c29b6605505 (diff)
downloadvolse-hubzilla-4791b2fd9c6dabc9ebb1f42a4993185d85493261.tar.gz
volse-hubzilla-4791b2fd9c6dabc9ebb1f42a4993185d85493261.tar.bz2
volse-hubzilla-4791b2fd9c6dabc9ebb1f42a4993185d85493261.zip
add aid to notifiy table which we may need to supress duplicate notify emails across your channels
also try to handle the wretched mess of broken and duplicated hublocs that fred.cepheus.uberspace.de typically reports
Diffstat (limited to 'include/enotify.php')
-rw-r--r--include/enotify.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/enotify.php b/include/enotify.php
index 67fe748d1..91b37a913 100644
--- a/include/enotify.php
+++ b/include/enotify.php
@@ -322,6 +322,7 @@ function notification($params) {
$datarray['url'] = $sender['xchan_url'];
$datarray['photo'] = $sender['xchan_photo_s'];
$datarray['date'] = datetime_convert();
+ $datarray['aid'] = $recip['channel_account_id'];
$datarray['uid'] = $recip['channel_id'];
$datarray['link'] = $itemlink;
$datarray['parent'] = $parent_id;
@@ -340,13 +341,14 @@ function notification($params) {
// create notification entry in DB
- $r = q("insert into notify (hash,name,url,photo,date,uid,link,parent,type,verb,otype)
- values('%s','%s','%s','%s','%s',%d,'%s',%d,%d,'%s','%s')",
+ $r = q("insert into notify (hash,name,url,photo,date,aid,uid,link,parent,type,verb,otype)
+ values('%s','%s','%s','%s','%s',%d,%d,'%s',%d,%d,'%s','%s')",
dbesc($datarray['hash']),
dbesc($datarray['name']),
dbesc($datarray['url']),
dbesc($datarray['photo']),
dbesc($datarray['date']),
+ intval($datarray['aid']),
intval($datarray['uid']),
dbesc($datarray['link']),
intval($datarray['parent']),
@@ -559,7 +561,7 @@ class enotify {
// send the message
$res = mail(
- $params['toEmail'], // send to address
+ $params['toEmail'], // send to address
$messageSubject, // subject
$multipartMessageBody, // message body
$messageHeader // message headers