aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Zot6/Zot6Handler.php
diff options
context:
space:
mode:
authorKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2019-01-18 22:17:10 +0100
committerKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2019-01-23 22:25:47 +0100
commit13e0151cd2569832588cc9a973bcf40d850edd53 (patch)
tree1d2054ca8b9edd9435d1ffa4c2584afea9121102 /Zotlabs/Zot6/Zot6Handler.php
parent51a7be29f50c4c62a2afb0ed155df43af9351fad (diff)
downloadvolse-hubzilla-13e0151cd2569832588cc9a973bcf40d850edd53.tar.gz
volse-hubzilla-13e0151cd2569832588cc9a973bcf40d850edd53.tar.bz2
volse-hubzilla-13e0151cd2569832588cc9a973bcf40d850edd53.zip
Correct and extend Doxygen comments.
Correct some documentation errors for Doxygen and add more comments. Document some undefined variables with @FIXME.
Diffstat (limited to 'Zotlabs/Zot6/Zot6Handler.php')
-rw-r--r--Zotlabs/Zot6/Zot6Handler.php36
1 files changed, 14 insertions, 22 deletions
diff --git a/Zotlabs/Zot6/Zot6Handler.php b/Zotlabs/Zot6/Zot6Handler.php
index e320e7825..8f8957037 100644
--- a/Zotlabs/Zot6/Zot6Handler.php
+++ b/Zotlabs/Zot6/Zot6Handler.php
@@ -29,7 +29,7 @@ class Zot6Handler implements IHandler {
// Implementation of specific methods follows;
- // These generally do a small amout of validation and call Libzot
+ // These generally do a small amout of validation and call Libzot
// to do any heavy lifting
static function reply_notify($data,$hub) {
@@ -40,7 +40,7 @@ class Zot6Handler implements IHandler {
$x = Libzot::fetch($data);
$ret['delivery_report'] = $x;
-
+
$ret['success'] = true;
return $ret;
@@ -58,11 +58,11 @@ class Zot6Handler implements IHandler {
*
* @param array $sender
* @param array $recipients
+ * @param array $hub
*
- * @return json_return_and_die()
+ * @return array
*/
-
- static function reply_refresh($sender, $recipients,$hub) {
+ static function reply_refresh($sender, $recipients, $hub) {
$ret = array('success' => false);
if($recipients) {
@@ -70,19 +70,18 @@ class Zot6Handler implements IHandler {
// This would be a permissions update, typically for one connection
foreach ($recipients as $recip) {
-
$r = q("select channel.*,xchan.* from channel
left join xchan on channel_portable_id = xchan_hash
where xchan_hash ='%s' limit 1",
dbesc($recip)
);
-
+ /// @FIXME $msgtype is undefined
$x = Libzot::refresh( [ 'hubloc_id_url' => $hub['hubloc_id_url'] ], $r[0], (($msgtype === 'force_refresh') ? true : false));
}
}
else {
// system wide refresh
-
+ /// @FIXME $msgtype is undefined
$x = Libzot::refresh( [ 'hubloc_id_url' => $hub['hubloc_id_url'] ], null, (($msgtype === 'force_refresh') ? true : false));
}
@@ -100,17 +99,16 @@ class Zot6Handler implements IHandler {
* for that packet. We will create a message_list array of the entire conversation starting with
* the missing parent and invoke delivery to the sender of the packet.
*
- * Zotlabs/Daemon/Deliver.php (for local delivery) and
+ * Zotlabs/Daemon/Deliver.php (for local delivery) and
* mod/post.php???? @fixme (for web delivery) detect the existence of
* this 'message_list' at the destination and split it into individual messages which are
* processed/delivered in order.
*
- *
* @param array $data
+ * @param array $hub
* @return array
*/
-
- static function reply_message_request($data,$hub) {
+ static function reply_message_request($data, $hub) {
$ret = [ 'success' => false ];
$message_id = EMPTY_STR;
@@ -153,11 +151,10 @@ class Zot6Handler implements IHandler {
/*
* fetch the requested conversation
*/
-
+ /// @FIXME $sender_hash is undefined
$messages = zot_feed($c[0]['channel_id'],$sender_hash, [ 'message_id' => $data['message_id'], 'encoding' => 'activitystreams' ]);
return (($messages) ? : [] );
-
}
static function rekey_request($sender,$data,$hub) {
@@ -183,7 +180,7 @@ class Zot6Handler implements IHandler {
dbesc($oldhash)
);
}
- else
+ else
return $ret;
@@ -219,10 +216,10 @@ class Zot6Handler implements IHandler {
*
* @param array $sender
* @param array $recipients
+ * @param array $hub
*
- * return json_return_and_die()
+ * @return array
*/
-
static function reply_purge($sender, $recipients, $hub) {
$ret = array('success' => false);
@@ -259,9 +256,4 @@ class Zot6Handler implements IHandler {
return $ret;
}
-
-
-
-
-
}