mirror of
https://github.com/friendica/friendica
synced 2024-11-12 23:42:54 +00:00
Merge pull request #11678 from Quix0r/fixes/send-contact-accept-id-string
Fix for Transmitter::sendContactAccept() wrong 2nd parameter type
This commit is contained in:
commit
0322456f70
2 changed files with 7 additions and 5 deletions
|
@ -1267,8 +1267,10 @@ class Processor
|
||||||
Contact::update(['hub-verify' => $activity['id'], 'protocol' => Protocol::ACTIVITYPUB], ['id' => $cid]);
|
Contact::update(['hub-verify' => $activity['id'], 'protocol' => Protocol::ACTIVITYPUB], ['id' => $cid]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$item = ['author-id' => Contact::getIdForURL($activity['actor']),
|
$item = [
|
||||||
'author-link' => $activity['actor']];
|
'author-id' => Contact::getIdForURL($activity['actor']),
|
||||||
|
'author-link' => $activity['actor'],
|
||||||
|
];
|
||||||
|
|
||||||
// Ensure that the contact has got the right network type
|
// Ensure that the contact has got the right network type
|
||||||
self::switchContact($item['author-id']);
|
self::switchContact($item['author-id']);
|
||||||
|
|
|
@ -2116,13 +2116,13 @@ class Transmitter
|
||||||
* Transmit a message that the contact request had been accepted
|
* Transmit a message that the contact request had been accepted
|
||||||
*
|
*
|
||||||
* @param string $target Target profile
|
* @param string $target Target profile
|
||||||
* @param integer $id Object id
|
* @param string $id Object id
|
||||||
* @param integer $uid User ID
|
* @param integer $uid User ID
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function sendContactAccept(string $target, int $id, int $uid)
|
public static function sendContactAccept(string $target, string $id, int $uid)
|
||||||
{
|
{
|
||||||
$profile = APContact::getByURL($target);
|
$profile = APContact::getByURL($target);
|
||||||
if (empty($profile['inbox'])) {
|
if (empty($profile['inbox'])) {
|
||||||
|
@ -2137,7 +2137,7 @@ class Transmitter
|
||||||
'type' => 'Accept',
|
'type' => 'Accept',
|
||||||
'actor' => $owner['url'],
|
'actor' => $owner['url'],
|
||||||
'object' => [
|
'object' => [
|
||||||
'id' => (string)$id,
|
'id' => $id,
|
||||||
'type' => 'Follow',
|
'type' => 'Follow',
|
||||||
'actor' => $profile['url'],
|
'actor' => $profile['url'],
|
||||||
'object' => $owner['url']
|
'object' => $owner['url']
|
||||||
|
|
Loading…
Reference in a new issue