// our post, so he/she must be a contact of ours and his/her public key
// should be in $msg['key']
-/* if(strcasecmp($diaspora_handle,$msg['author']) == 0) {
- $person = $contact;
- $key = $msg['key'];
- }
- else {
- $person = find_diaspora_person_by_handle($diaspora_handle);
-
- if(is_array($person) && x($person,'pubkey'))
- $key = $person['pubkey'];
- else {
- logger('diaspora_comment: unable to find author details');
- return;
- }
- }*/
-
$author_signature = base64_decode($author_signature);
if(! rsa_verify($signed_data,$author_signature,$key,'sha256')) {
// Phew! Everything checks out. Now create an item.
- // Find the original comment author information
+ // Find the original comment author information.
+ // We need this to make sure we display the comment author
+ // information (name and avatar) correctly.
if(strcasecmp($diaspora_handle,$msg['author']) == 0)
$person = $contact;
else {
// our post, so he/she must be a contact of ours and his/her public key
// should be in $msg['key']
-/* if(strcasecmp($diaspora_handle,$msg['author']) == 0) {
- $person = $contact;
- $key = $msg['key'];
- }
- else {
- $person = find_diaspora_person_by_handle($diaspora_handle);
- if(is_array($person) && x($person,'pubkey'))
- $key = $person['pubkey'];
- else {
- logger('diaspora_like: unable to find author details');
- return;
- }
- }*/
-
$author_signature = base64_decode($author_signature);
if(! rsa_verify($signed_data,$author_signature,$key,'sha256')) {
// Phew! Everything checks out. Now create an item.
- // Find the original like author information
+ // Find the original comment author information.
+ // We need this to make sure we display the comment author
+ // information (name and avatar) correctly.
if(strcasecmp($diaspora_handle,$msg['author']) == 0)
$person = $contact;
else {