diff options
author | Max Kostikov <max@kostikov.co> | 2019-10-05 10:31:47 +0200 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-10-05 10:31:47 +0200 |
commit | 79b0a6ba9c1a45f98a39870e424335613dc2e77f (patch) | |
tree | 9039454050aa808bcc9ba3579d0a74989ea1ee8b /include/zot.php | |
parent | 0c2438b36a536249e332d38e02a527af4344023f (diff) | |
download | volse-hubzilla-79b0a6ba9c1a45f98a39870e424335613dc2e77f.tar.gz volse-hubzilla-79b0a6ba9c1a45f98a39870e424335613dc2e77f.tar.bz2 volse-hubzilla-79b0a6ba9c1a45f98a39870e424335613dc2e77f.zip |
Allow addons to process forum posts published through mentions
Diffstat (limited to 'include/zot.php')
-rw-r--r-- | include/zot.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/include/zot.php b/include/zot.php index bd85dd755..d08146287 100644 --- a/include/zot.php +++ b/include/zot.php @@ -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']); - $r = q("select * from channel where channel_hash = '%s' limit 1", - dbesc($d['hash']) - ); + $channel = channelx_by_hash($d['hash']); - if(! $r) { + if(! $channel) { $DR->update('recipient not found'); $result[] = $DR->get(); continue; } - $channel = $r[0]; $DR->set_name($channel['channel_name'] . ' <' . channel_reddress($channel) . '>'); /* 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 // 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 * Called when an item has been posted on this machine via mod/item.php (also via API). |