mirror of
https://github.com/friendica/friendica
synced 2025-04-25 11:10:11 +00:00
Store the protocol of the received message
This commit is contained in:
parent
dd4a656dec
commit
7ab63d2106
9 changed files with 38 additions and 37 deletions
|
@ -875,7 +875,9 @@ class OStatus
|
|||
*/
|
||||
private static function fetchSelf($self, array &$item)
|
||||
{
|
||||
$condition = ['`item-uri` = ? AND `protocol` IN (?, ?)', $self, Conversation::PARCEL_DFRN, Conversation::PARCEL_SALMON];
|
||||
$condition = ['item-uri' => $self, 'protocol' => [Conversation::PARCEL_DFRN,
|
||||
Conversation::PARCEL_DIASPORA_DFRN, Conversation::PARCEL_LEGACY_DFRN,
|
||||
Conversation::PARCEL_LOCAL_DFRN, Conversation::PARCEL_DIRECT, Conversation::PARCEL_SALMON]];
|
||||
if (DBA::exists('conversation', $condition)) {
|
||||
Logger::log('Conversation '.$item['uri'].' is already stored.', Logger::DEBUG);
|
||||
return;
|
||||
|
@ -912,8 +914,11 @@ class OStatus
|
|||
*/
|
||||
private static function fetchRelated($related, $related_uri, $importer)
|
||||
{
|
||||
$condition = ['`item-uri` = ? AND `protocol` IN (?, ?)', $related_uri, Conversation::PARCEL_DFRN, Conversation::PARCEL_SALMON];
|
||||
$conversation = DBA::selectFirst('conversation', ['source', 'protocol'], $condition);
|
||||
$condition = ['item-uri' => $related_uri, 'protocol' => [Conversation::PARCEL_DFRN,
|
||||
Conversation::PARCEL_DIASPORA_DFRN, Conversation::PARCEL_LEGACY_DFRN,
|
||||
Conversation::PARCEL_LOCAL_DFRN, Conversation::PARCEL_DIRECT, Conversation::PARCEL_SALMON]];
|
||||
if (DBA::exists('conversation', $condition)) {
|
||||
$conversation = DBA::selectFirst('conversation', ['source', 'protocol'], $condition);
|
||||
if (DBA::isResult($conversation)) {
|
||||
$stored = true;
|
||||
$xml = $conversation['source'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue