aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/zot.php b/include/zot.php
index 0cb3ab9ed..bae20b4f0 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1178,8 +1178,10 @@ function zot_import($arr, $sender_url) {
if($i['message']['type'] === 'activity') {
$arr = get_item_elements($i['message']);
- if(! array_key_exists('created',$arr)) {
- logger('Activity rejected: probable failure to lookup author/owner. ' . print_r($i['message'],true));
+ $v = validate_item_elements($i['message'],$arr);
+
+ if(! $v['success']) {
+ logger('Activity rejected: ' . $v['message'] . ' ' . print_r($i['message'],true));
continue;
}
@@ -1537,8 +1539,9 @@ function process_delivery($sender, $arr, $deliveries, $relay, $public = false, $
$tag_delivery = tgroup_check($channel['channel_id'],$arr);
- $perm = (($arr['mid'] == $arr['parent_mid']) ? 'send_stream' : 'post_comments');
-
+ $perm = 'send_stream';
+ if(($arr['mid'] !== $arr['parent_mid']) && ($relay))
+ $perm = 'post_comments';
// This is our own post, possibly coming from a channel clone