mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02:00
Merge pull request #5710 from annando/fix-api
Fix for timeout issues when posting to the API
This commit is contained in:
commit
d5a3b0bd5e
2 changed files with 31 additions and 23 deletions
10
mod/item.php
10
mod/item.php
|
@ -39,7 +39,7 @@ require_once 'include/items.php';
|
|||
|
||||
function item_post(App $a) {
|
||||
if (!local_user() && !remote_user()) {
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
require_once 'include/security.php';
|
||||
|
@ -154,7 +154,7 @@ function item_post(App $a) {
|
|||
if (($message_id != '') && ($profile_uid != 0)) {
|
||||
if (Item::exists(['uri' => $message_id, 'uid' => $profile_uid])) {
|
||||
logger("Message with URI ".$message_id." already exists for user ".$profile_uid, LOGGER_DEBUG);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,7 @@ function item_post(App $a) {
|
|||
$user = DBA::selectFirst('user', [], ['uid' => $profile_uid]);
|
||||
|
||||
if (!DBA::isResult($user) && !$parent) {
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
$categories = '';
|
||||
|
@ -843,6 +843,10 @@ function item_post(App $a) {
|
|||
|
||||
logger('post_complete');
|
||||
|
||||
if ($api_source) {
|
||||
return $post_id;
|
||||
}
|
||||
|
||||
item_post_return(System::baseUrl(), $api_source, $return_path);
|
||||
// NOTREACHED
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue