aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-11-02 00:06:52 -0700
committerfriendica <info@friendica.com>2014-11-02 00:06:52 -0700
commit4274a2d06c9ee2c28acba0dac3d5353e13776581 (patch)
treea61d9475c1e89209fd071222a9b3dcc83024295c /include/zot.php
parentdc5e05d3349bc493e4c1f33fb2561bb80ddd0c7f (diff)
downloadvolse-hubzilla-4274a2d06c9ee2c28acba0dac3d5353e13776581.tar.gz
volse-hubzilla-4274a2d06c9ee2c28acba0dac3d5353e13776581.tar.bz2
volse-hubzilla-4274a2d06c9ee2c28acba0dac3d5353e13776581.zip
add some more safety checks before turning the conversation request messages back on
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/zot.php b/include/zot.php
index 24ace9cbb..153fa28bf 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1448,11 +1448,13 @@ function process_delivery($sender,$arr,$deliveries,$relay,$public = false,$reque
// Don't do this if it's a relay post as we're the ones who are supposed to have the copy and we don't want the request to loop.
// Also don't do this if this comment came from a conversation request packet. It's possible that comments are allowed but posting
// isn't and that could cause a conversation fetch loop. We can detect these packets since they are delivered via a 'notify' packet type
- // that has a message_id element in the initial zot packet (just like the corresponding 'request' packet type which makes the request).
+ // that has a message_id element in the initial zot packet (just like the corresponding 'request' packet type which makes the request).
+ // We'll also check the send_stream permission, because if it isn't allowed the top level post is unlikely to be imported and
+ // this is just an exercise in futility.
- if((! $relay) && (! $request))
+ if((! $relay) && (! $request) && (! $public) && perm_is_allowed($channel['channel_id'],$sender['hash'],'send_stream')) {
proc_run('php', 'include/notifier.php', 'request', $channel['channel_id'], $sender['hash'], $arr['parent_mid']);
-
+ }
continue;
}
if($relay) {