mirror of
https://github.com/friendica/friendica
synced 2025-04-26 09:50:15 +00:00
Receiving was tested, sending is implemented and tested as well, currently unused
This commit is contained in:
parent
f51a254ed0
commit
0594f13c35
3 changed files with 42 additions and 4 deletions
|
@ -32,10 +32,10 @@ function dfrn_notify_post(App $a) {
|
|||
$msg = Diaspora::decodeRaw($user, $postdata);
|
||||
|
||||
// Check if the user has got this contact
|
||||
$cid = getIdForURL($msg['author'], $user['uid']);
|
||||
$cid = Contact::getIdForURL($msg['author'], $user['uid']);
|
||||
if (!$cid) {
|
||||
// Otherwise there should be a public contact
|
||||
$cid = getIdForURL($msg['author']);
|
||||
$cid = Contact::getIdForURL($msg['author']);
|
||||
if (!$cid) {
|
||||
logger('Contact not found for address ' . $msg['author']);
|
||||
System::xmlExit(3, 'Contact not found');
|
||||
|
@ -59,7 +59,7 @@ function dfrn_notify_post(App $a) {
|
|||
|
||||
// Now we should be able to import it
|
||||
$ret = DFRN::import($msg['message'], $importer);
|
||||
System::xmlExit($ret, 'Processed');
|
||||
System::xmlExit($ret, 'Done');
|
||||
} else {
|
||||
require_once 'mod/salmon.php';
|
||||
salmon_post($a, $postdata);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue