send notify emails to community pages as well as people

This commit is contained in:
friendica 2012-02-10 00:08:23 -08:00
parent 2f2e331c33
commit b346f4464c
1 changed files with 32 additions and 30 deletions

View File

@ -968,7 +968,8 @@ function tag_deliver($uid,$item_id) {
if(! $mention)
return;
if(! $community_page) {
// send a notification
require_once('include/enotify.php');
notification(array(
'type' => NOTIFY_TAGSELF,
@ -984,9 +985,10 @@ function tag_deliver($uid,$item_id) {
'verb' => ACTIVITY_TAG,
'otype' => 'item'
));
if(! $community_page)
return;
}
else {
// tgroup delivery - setup a second delivery chain
// prevent delivery looping - only proceed
// if the message originated elsewhere and is a top-level post
@ -1001,7 +1003,7 @@ function tag_deliver($uid,$item_id) {
);
proc_run('php','include/notifier.php','tgroup',$item_id);
}
}
@ -1065,7 +1067,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
$final_dfrn_id = '';
if(($contact['duplex'] && strlen($contact['pubkey'])) || ($owner['page-flags'] == PAGE_COMMUNITY)) {
if(($contact['duplex'] && strlen($contact['pubkey'])) || ($owner['page-flags'] == PAGE_COMMUNITY && strlen($contact['pubkey']))) {
openssl_public_decrypt($sent_dfrn_id,$final_dfrn_id,$contact['pubkey']);
openssl_public_decrypt($challenge,$postvars['challenge'],$contact['pubkey']);
}
@ -1108,7 +1110,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
if($dfrn_version >= 2.1) {
if(($contact['duplex'] && strlen($contact['pubkey'])) || ($owner['page-flags'] == PAGE_COMMUNITY)) {
if(($contact['duplex'] && strlen($contact['pubkey'])) || ($owner['page-flags'] == PAGE_COMMUNITY && strlen($contact['pubkey']))) {
openssl_public_encrypt($key,$postvars['key'],$contact['pubkey']);
}
else {