Include the entire original item when notifying other channels of deletions as it contains important routing and scope information. Previously we were only sending a couple of critical fields like the message-id, flags, and creation date. The thinking was that it is deleted, let's not resend the deleted contents anywhere. But in order to route this through the same path the original post took we really need the entire original post with all of its baggage attached.
This commit is contained in:
parent
c97222c2fc
commit
bf1f18e172
@ -843,12 +843,7 @@ function encode_item($item) {
|
||||
}
|
||||
|
||||
if($item['item_restrict'] & ITEM_DELETED) {
|
||||
$x['message_id'] = $item['mid'];
|
||||
$x['created'] = $item['created'];
|
||||
$x['flags'] = array('deleted');
|
||||
$x['owner'] = encode_item_xchan($item['owner']);
|
||||
$x['author'] = encode_item_xchan($item['author']);
|
||||
return $x;
|
||||
}
|
||||
|
||||
$x['message_id'] = $item['mid'];
|
||||
|
@ -1412,7 +1412,7 @@ function process_delivery($sender,$arr,$deliveries,$relay,$public = false) {
|
||||
}
|
||||
|
||||
if((! perm_is_allowed($channel['channel_id'],$sender['hash'],$perm)) && (! $tag_delivery) && (! $public)) {
|
||||
logger("permission denied for delivery {$channel['channel_id']}");
|
||||
logger("permission denied for delivery to channel {$channel['channel_id']} {$channel['channel_address']}");
|
||||
$result[] = array($d['hash'],'permission denied',$channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . get_app()->get_hostname() . '>');
|
||||
continue;
|
||||
}
|
||||
|
@ -539,7 +539,7 @@ function post_post(&$a) {
|
||||
|
||||
$sitekey = $hubsite['hubloc_sitekey'];
|
||||
|
||||
logger('mod_zot: Checking sitekey: ' . $sitekey);
|
||||
logger('mod_zot: Checking sitekey: ' . $sitekey, LOGGER_DATA);
|
||||
|
||||
if(rsa_verify($data['callback'],base64url_decode($data['callback_sig']),$sitekey)) {
|
||||
$forgery = false;
|
||||
|
@ -1 +1 @@
|
||||
2014-04-09.642
|
||||
2014-04-10.643
|
||||
|
Reference in New Issue
Block a user