process_delivery: ignore self

This commit is contained in:
redmatrix 2015-09-28 19:04:36 -07:00
parent 67fe8fc4a7
commit 3a8e1e0484
4 changed files with 13 additions and 3 deletions

View File

@ -49,7 +49,7 @@ define ( 'PLATFORM_NAME', 'redmatrix' );
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
define ( 'ZOT_REVISION', 1 );
define ( 'DB_UPDATE_VERSION', 1155 );
define ( 'DB_UPDATE_VERSION', 1156 );
/**
* @brief Constant with a HTML line break.

View File

@ -1584,6 +1584,12 @@ function process_delivery($sender, $arr, $deliveries, $relay, $public = false, $
$channel = $r[0];
$DR->addto_recipient($channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . get_app()->get_hostname() . '>');
if($d['hash'] === $sender['hash']) {
$DR->update('self delivery ignored');
$result[] = $DR->get();
continue;
}
// allow public postings to the sys channel regardless of permissions, but not
// for comments travelling upstream. Wait and catch them on the way down.

View File

@ -1,6 +1,6 @@
<?php
define( 'UPDATE_VERSION' , 1155 );
define( 'UPDATE_VERSION' , 1156 );
/**
*
@ -1766,3 +1766,7 @@ function update_r1153() {
function update_r1154() {
return UPDATE_SUCCESS;
}
function update_r1155() {
return UPDATE_SUCCESS;
}

View File

@ -1 +1 @@
2015-09-27.1168
2015-09-28.1169