mirror of
https://github.com/friendica/friendica
synced 2025-05-11 05:44:10 +02:00
Merge remote-tracking branch 'upstream/develop' into term2tag
This commit is contained in:
commit
f52614e249
3 changed files with 16 additions and 30 deletions
|
@ -4016,30 +4016,24 @@ class Diaspora
|
|||
|
||||
Logger::log("Got relayable data ".$type." for item ".$item["guid"]." (".$item["id"].")", Logger::DEBUG);
|
||||
|
||||
// Old way - is used by the internal Friendica functions
|
||||
/// @todo Change all signatur storing functions to the new format
|
||||
if ($item['signed_text'] && $item['signature'] && $item['signer']) {
|
||||
$message = self::messageFromSignature($item);
|
||||
} else {// New way
|
||||
$msg = json_decode($item['signed_text'], true);
|
||||
$msg = json_decode($item['signed_text'], true);
|
||||
|
||||
$message = [];
|
||||
if (is_array($msg)) {
|
||||
foreach ($msg as $field => $data) {
|
||||
if (!$item["deleted"]) {
|
||||
if ($field == "diaspora_handle") {
|
||||
$field = "author";
|
||||
}
|
||||
if ($field == "target_type") {
|
||||
$field = "parent_type";
|
||||
}
|
||||
$message = [];
|
||||
if (is_array($msg)) {
|
||||
foreach ($msg as $field => $data) {
|
||||
if (!$item["deleted"]) {
|
||||
if ($field == "diaspora_handle") {
|
||||
$field = "author";
|
||||
}
|
||||
if ($field == "target_type") {
|
||||
$field = "parent_type";
|
||||
}
|
||||
|
||||
$message[$field] = $data;
|
||||
}
|
||||
} else {
|
||||
Logger::log("Signature text for item ".$item["guid"]." (".$item["id"].") couldn't be extracted: ".$item['signed_text'], Logger::DEBUG);
|
||||
|
||||
$message[$field] = $data;
|
||||
}
|
||||
} else {
|
||||
Logger::log("Signature text for item ".$item["guid"]." (".$item["id"].") couldn't be extracted: ".$item['signed_text'], Logger::DEBUG);
|
||||
}
|
||||
|
||||
$message["parent_author_signature"] = self::signature($owner, $message);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue