Merge branch 'dev' into 'dev'

Allow addons to process forum posts published through mentions

See merge request hubzilla/core!1745
This commit is contained in:
Mario 2019-10-05 10:31:47 +02:00
commit afee2cf71a
2 changed files with 4 additions and 7 deletions

View File

@ -1764,7 +1764,7 @@ class Libzot {
// if it's a sourced post, call the post_local hooks as if it were // if it's a sourced post, call the post_local hooks as if it were
// posted locally so that crosspost connectors will be triggered. // posted locally so that crosspost connectors will be triggered.
if(check_item_source($arr['uid'], $arr)) { if(check_item_source($arr['uid'], $arr) || ($channel['xchan_pubforum'] == 1)) {
/** /**
* @hooks post_local * @hooks post_local
* Called when an item has been posted on this machine via mod/item.php (also via API). * Called when an item has been posted on this machine via mod/item.php (also via API).

View File

@ -1776,17 +1776,14 @@ function process_delivery($sender, $arr, $deliveries, $relay, $public = false, $
$DR = new Zotlabs\Lib\DReport(z_root(),$sender['hash'],$d['hash'],$arr['mid']); $DR = new Zotlabs\Lib\DReport(z_root(),$sender['hash'],$d['hash'],$arr['mid']);
$r = q("select * from channel where channel_hash = '%s' limit 1", $channel = channelx_by_hash($d['hash']);
dbesc($d['hash'])
);
if(! $r) { if(! $channel) {
$DR->update('recipient not found'); $DR->update('recipient not found');
$result[] = $DR->get(); $result[] = $DR->get();
continue; continue;
} }
$channel = $r[0];
$DR->set_name($channel['channel_name'] . ' <' . channel_reddress($channel) . '>'); $DR->set_name($channel['channel_name'] . ' <' . channel_reddress($channel) . '>');
/* blacklisted channels get a permission denied, no special message to tip them off */ /* blacklisted channels get a permission denied, no special message to tip them off */
@ -2032,7 +2029,7 @@ function process_delivery($sender, $arr, $deliveries, $relay, $public = false, $
// if it's a sourced post, call the post_local hooks as if it were // if it's a sourced post, call the post_local hooks as if it were
// posted locally so that crosspost connectors will be triggered. // posted locally so that crosspost connectors will be triggered.
if(check_item_source($arr['uid'], $arr)) { if(check_item_source($arr['uid'], $arr) || ($channel['xchan_pubforum'] == 1)) {
/** /**
* @hooks post_local * @hooks post_local
* Called when an item has been posted on this machine via mod/item.php (also via API). * Called when an item has been posted on this machine via mod/item.php (also via API).