mirror of
https://github.com/friendica/friendica
synced 2025-04-26 23:50:11 +00:00
API: several fixes to the Twitter/Statusnet API
This commit is contained in:
parent
093dd70e79
commit
bf5c8a2c43
22 changed files with 94 additions and 70 deletions
|
@ -92,6 +92,11 @@ class Receive extends BaseModule
|
|||
$this->logger->info('Diaspora: Receiving post.');
|
||||
|
||||
$importer = User::getByGuid($this->parameters['guid']);
|
||||
if (empty($importer)) {
|
||||
// We haven't found the user.
|
||||
// To avoid the remote system trying again we send the message that we accepted the content.
|
||||
throw new HTTPException\AcceptedException();
|
||||
}
|
||||
|
||||
if ($importer['account-type'] == User::ACCOUNT_TYPE_COMMUNITY) {
|
||||
// Communities aren't working with the Diaspora protoccol
|
||||
|
@ -99,7 +104,7 @@ class Receive extends BaseModule
|
|||
throw new HTTPException\AcceptedException();
|
||||
}
|
||||
|
||||
$msg = $this->decodePost(false, $importer['prvkey'] ?? '');
|
||||
$msg = $this->decodePost(false, $importer['prvkey']);
|
||||
|
||||
$this->logger->info('Diaspora: Dispatching.');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue