X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fdiaspora.php;h=e3a3dcd78c2e05d37d177b9f5b4a6e78db2cceb5;hb=9d2864fc587c962a4ad9d6a7c4287b6ff59f3cc5;hp=d2a90fc983bdbb5b030a6cee1c66cb8f93879e88;hpb=faa9b77a90be70f76990451aff9c25fa2e05dad4;p=friendica.git diff --git a/include/diaspora.php b/include/diaspora.php index d2a90fc983..e3a3dcd78c 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -277,7 +277,7 @@ class diaspora { * * @param array $msg The post that will be dispatched * - * @return bool Was the message accepted? + * @return int The message id of the generated message, "true" or "false" if there was an error */ public static function dispatch_public($msg) { @@ -289,7 +289,7 @@ class diaspora { // Use a dummy importer to import the data for the public copy $importer = array("uid" => 0, "page-flags" => PAGE_FREELOVE); - $item_id = self::dispatch($importer,$msg); + $message_id = self::dispatch($importer,$msg); // Now distribute it to the followers $r = q("SELECT `user`.* FROM `user` WHERE `user`.`uid` IN @@ -306,7 +306,7 @@ class diaspora { } else logger("No subscribers for ".$msg["author"]." ".print_r($msg, true)); - return $item_id; + return $message_id; } /** @@ -315,7 +315,7 @@ class diaspora { * @param array $importer Array of the importer user * @param array $msg The post that will be dispatched * - * @return bool Was the message accepted? + * @return int The message id of the generated message, "true" or "false" if there was an error */ public static function dispatch($importer, $msg) { @@ -737,7 +737,7 @@ class diaspora { * @param string $handle The checked handle in the format user@domain.tld * @param bool $is_comment Is the check for a comment? * - * @return bool is posting allowed? + * @return array The contact data */ private function allowed_contact_by_handle($importer, $handle, $is_comment = false) { $contact = self::contact_by_handle($importer["uid"], $handle); @@ -931,7 +931,9 @@ class diaspora { * @param array $person The record of the person * @param int $uid The user id * - * @return array of contact id and network type + * @return array + * 'cid' => contact id + * 'network' => network type */ private function author_contact_by_url($contact, $person, $uid) {