Merge remote-tracking branch 'upstream/develop' into diaspora-item

This commit is contained in:
Michael 2023-01-07 19:52:23 +00:00
commit 24c32cff0d
99 changed files with 2750 additions and 2500 deletions

View file

@ -2855,7 +2855,7 @@ class Diaspora
$namespaces = ['me' => ActivityNamespace::SALMON_ME];
return XML::fromArray($xmldata, $xml, false, $namespaces);
return XML::fromArray($xmldata, $dummy, false, $namespaces);
}
/**
@ -2974,12 +2974,11 @@ class Diaspora
* @param array $message The message data
*
* @return string The post XML
* @throws \Exception
*/
public static function buildPostXml(string $type, array $message): string
{
$data = [$type => $message];
return XML::fromArray($data, $xml);
return XML::fromArray([$type => $message]);
}
/**

View file

@ -160,7 +160,7 @@ class Salmon
$namespaces = ['me' => ActivityNamespace::SALMON_ME];
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
$salmon = XML::fromArray($xmldata, $dummy, false, $namespaces);
// slap them
$postResult = DI::httpClient()->post($url, $salmon, [
@ -187,9 +187,7 @@ class Salmon
]
];
$namespaces = ['me' => ActivityNamespace::SALMON_ME];
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
$salmon = XML::fromArray($xmldata, $dummy, false, $namespaces);
// slap them
$postResult = DI::httpClient()->post($url, $salmon, [
@ -214,9 +212,7 @@ class Salmon
]
];
$namespaces = ['me' => ActivityNamespace::SALMON_ME];
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
$salmon = XML::fromArray($xmldata, $dummy, false, $namespaces);
// slap them
$postResult = DI::httpClient()->post($url, $salmon, [