mirror of
https://github.com/friendica/friendica
synced 2025-04-25 20:30: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
|
@ -1553,7 +1553,7 @@ class Item
|
|||
$item['wall'] = 1;
|
||||
$item['origin'] = 1;
|
||||
$item['network'] = Protocol::DFRN;
|
||||
$item['protocol'] = Conversation::PARCEL_DFRN;
|
||||
$item['protocol'] = Conversation::PARCEL_DIRECT;
|
||||
|
||||
if (is_int($notify)) {
|
||||
$priority = $notify;
|
||||
|
@ -1879,14 +1879,14 @@ class Item
|
|||
Tag::storeFromBody($item['uri-id'], $body);
|
||||
}
|
||||
|
||||
// Remove all fields that aren't part of the item table
|
||||
foreach ($item as $field => $value) {
|
||||
if (!in_array($field, $structure['item'])) {
|
||||
unset($item[$field]);
|
||||
}
|
||||
}
|
||||
|
||||
if (Post\User::insert($item['uri-id'], $item['uid'], $item)) {
|
||||
// Remove all fields that aren't part of the item table
|
||||
foreach ($item as $field => $value) {
|
||||
if (!in_array($field, $structure['item'])) {
|
||||
unset($item[$field]);
|
||||
}
|
||||
}
|
||||
|
||||
$condition = ['uri-id' => $item['uri-id'], 'uid' => $item['uid'], 'network' => $item['network']];
|
||||
if (DBA::exists('item', $condition)) {
|
||||
Logger::notice('Item is already inserted - aborting', $condition);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue