mirror of
https://github.com/friendica/friendica
synced 2024-12-23 08:40:16 +00:00
Issue 13627: DMs now work bidirectional again
This commit is contained in:
parent
2b8a71231e
commit
08d06064ce
2 changed files with 6 additions and 8 deletions
|
@ -682,7 +682,7 @@ class Receiver
|
||||||
self::addArrivedId($object_data['object_id']);
|
self::addArrivedId($object_data['object_id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$decouple = DI::config()->get('system', 'decoupled_receiver') && !in_array($completion, [self::COMPLETION_MANUAL, self::COMPLETION_ANNOUNCE]);
|
$decouple = DI::config()->get('system', 'decoupled_receiver') && !in_array($completion, [self::COMPLETION_MANUAL, self::COMPLETION_ANNOUNCE]) && empty($object_data['directmessage']);
|
||||||
|
|
||||||
if ($decouple && ($trust_source || DI::config()->get('debug', 'ap_inbox_store_untrusted'))) {
|
if ($decouple && ($trust_source || DI::config()->get('debug', 'ap_inbox_store_untrusted'))) {
|
||||||
$object_data = Queue::add($object_data, $type, $uid, $http_signer, $push, $trust_source);
|
$object_data = Queue::add($object_data, $type, $uid, $http_signer, $push, $trust_source);
|
||||||
|
|
|
@ -1121,19 +1121,17 @@ class Transmitter
|
||||||
*/
|
*/
|
||||||
public static function fetchTargetInboxesFromMail(int $mail_id): array
|
public static function fetchTargetInboxesFromMail(int $mail_id): array
|
||||||
{
|
{
|
||||||
$mail = DBA::selectFirst('mail', ['uid', 'parent-uri', 'from-url'], ['id' => $mail_id]);
|
$mail = DBA::selectFirst('mail', ['contact-id'], ['id' => $mail_id]);
|
||||||
if (!DBA::isResult($mail)) {
|
if (!DBA::isResult($mail)) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$reply = DBA::selectFirst('mail', ['from-url'], ['parent-uri' => $mail['parent-uri'], 'reply' => false]);
|
$account = DBA::selectFirst('account-user-view', ['ap-inbox'], ['id' => $mail['contact-id']]);
|
||||||
if (!DBA::isResult($reply)) {
|
if (empty($account['ap-inbox'])) {
|
||||||
$reply = $mail;
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$apcontact = APContact::getByURL($reply['from-url'], false);
|
return [$account['ap-inbox'] => [$mail['contact-id']]];
|
||||||
|
|
||||||
return [$apcontact['inbox'] => [Contact::getIdForURL($reply['from-url'])]];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue