simplify the message signing spaghetti
This commit is contained in:
@@ -344,21 +344,6 @@ function photo_upload($channel, $observer, $args) {
|
||||
$item['tgt_type'] = ACTIVITY_OBJ_ALBUM;
|
||||
$item['target'] = json_encode($target);
|
||||
|
||||
$item['body'] = trim(z_input_filter($item['body'],$item['mimetype'],false));
|
||||
|
||||
if($item['author_xchan'] === $channel['channel_hash']) {
|
||||
$item['sig'] = base64url_encode(rsa_sign($item['body'],$channel['channel_prvkey']));
|
||||
$item['item_verified'] = 1;
|
||||
}
|
||||
else {
|
||||
$item['sig'] = '';
|
||||
}
|
||||
|
||||
// notify item_store or item_store_update that the input has been filtered and signed already.
|
||||
// The signing procedure in those functions uses local_channel() which may not apply here.
|
||||
|
||||
$item['input_filtered_signed'] = true;
|
||||
|
||||
$force = true;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user