mirror of
https://github.com/friendica/friendica
synced 2025-04-26 09:10:15 +00:00
AP: We can now receive "direct messages" (aka "mails") as well
This commit is contained in:
parent
969b7744c9
commit
3f55f93606
2 changed files with 78 additions and 3 deletions
|
@ -207,6 +207,7 @@ class Receiver
|
|||
return [];
|
||||
}
|
||||
$object_data['object_id'] = $object_id;
|
||||
$object_data['directmessage'] = JsonLD::fetchElement($activity, 'litepub:directMessage');
|
||||
|
||||
// We had been able to retrieve the object data - so we can trust the source
|
||||
$trust_source = true;
|
||||
|
@ -935,6 +936,11 @@ class Receiver
|
|||
|
||||
$object_data['receiver'] = self::getReceivers($object, $object_data['actor'], $object_data['tags']);
|
||||
|
||||
// Test if it is an answer to a mail
|
||||
if (DBA::exists('mail', ['uri' => $object_data['reply-to-id']])) {
|
||||
$object_data['directmessage'] = true;
|
||||
}
|
||||
|
||||
// Common object data:
|
||||
|
||||
// Unhandled
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue