aboutsummaryrefslogtreecommitdiffstats
path: root/include/notifier.php
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2011-08-22 13:56:08 +0200
committerfabrixxm <fabrix.xm@gmail.com>2011-08-22 13:56:08 +0200
commitd8bd4fbb3e38bf0ff9c7b61dba58e20c0d097d75 (patch)
treedbdc1dbffe5c56dcff18669e957f679b5ae37bb3 /include/notifier.php
parentafdc639f17f0f5e12f291b512ccc12b3df6b2acf (diff)
parent564ade0685470158ac487d9a9f18a21079c729bb (diff)
downloadvolse-hubzilla-d8bd4fbb3e38bf0ff9c7b61dba58e20c0d097d75.tar.gz
volse-hubzilla-d8bd4fbb3e38bf0ff9c7b61dba58e20c0d097d75.tar.bz2
volse-hubzilla-d8bd4fbb3e38bf0ff9c7b61dba58e20c0d097d75.zip
Merge branch 'master' into newui
Diffstat (limited to 'include/notifier.php')
-rw-r--r--include/notifier.php28
1 files changed, 17 insertions, 11 deletions
diff --git a/include/notifier.php b/include/notifier.php
index 15fb38534..cf8871fb9 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -502,22 +502,27 @@ function notifier_run($argv, $argc){
}
break;
case NETWORK_DIASPORA:
- if(get_config('system','dfrn_only') || (! get_config('diaspora_enabled')) || (! $normal_mode))
+ require_once('include/diaspora.php');
+ if(get_config('system','dfrn_only') || (! get_config('system','diaspora_enabled')) || (! $normal_mode))
break;
-
- if($target_item['deleted']) {
- // diaspora delete, (check for like)
-
+
+ if($target_item['verb'] === ACTIVITY_DISLIKE) {
+ // unsupported
+ break;
+ }
+ elseif($target_item['deleted'] && (! $parent_item['verb'] === ACTIVITY_LIKE)) {
+ // diaspora delete,
+ diaspora_send_retraction($target_item,$owner,$contact);
break;
}
elseif($followup) {
- // send to owner to relay
-
+ // send comments, likes and retractions of likes to owner to relay
+ diaspora_send_followup($target_item,$owner,$contact);
break;
}
elseif($target_item['parent'] != $target_item['id']) {
- // we are the relay
-
+ // we are the relay - send comments, likes and unlikes to our conversants
+ diaspora_send_relay($target_item,$owner,$contact);
break;
}
elseif($top_level) {
@@ -571,7 +576,7 @@ function notifier_run($argv, $argc){
/**
*
- * If you have less than 150 dfrn friends and it's a public message,
+ * If you have less than 999 dfrn friends and it's a public message,
* we'll just go ahead and push them out securely with dfrn/rino.
* If you've got more than that, you'll have to rely on PuSH delivery.
*
@@ -587,8 +592,9 @@ function notifier_run($argv, $argc){
*/
$r = q("SELECT `id`, `name` FROM `contact`
- WHERE `network` = NETWORK_DFRN AND `uid` = %d AND `blocked` = 0 AND `pending` = 0
+ WHERE `network` = '%s' AND `uid` = %d AND `blocked` = 0 AND `pending` = 0
AND `rel` != %d ",
+ dbesc(NETWORK_DFRN),
intval($owner['uid']),
intval(CONTACT_IS_SHARING)
);