aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/zot.php34
-rw-r--r--version.inc2
2 files changed, 29 insertions, 7 deletions
diff --git a/include/zot.php b/include/zot.php
index ba2a6a834..1924f3b23 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -614,21 +614,43 @@ function zot_import($arr) {
$incoming = $data['pickup'];
if(is_array($incoming)) {
foreach($incoming as $i) {
+
+ $deliveries = null;
+
if($i['notify'] && $i['notify']['recipients']) {
- // look for our site members in the recipient list
- // (fix the notifier to send them...)
+ $recip_arr = array();
+ foreach($i['notify']['recipients'] as $recip) {
+ $recip_arr[] = array('hash' => base64url_encode(hash('whirlpool',$recip['guid'] . $recip['guid_sig'], true)));
+ }
+ stringify_array_elms($recip_arr);
+ $recips = ids_to_querystr($recip_arr,'hash');
+
+ $r = q("select * from channel where channel_hash in ( " . $recips . " ) ");
+ if(! $r)
+ continue;
+
+ $deliveries = $r;
+
+ // We found somebody on this site that's in the recipient list.
+
}
else {
- // look for any site members who are accepting posts from this sender
- }
- if($i['message'] && $i['message']['type'] === 'activity') {
- // process the message
+ // Public post. look for any site members who are accepting posts from this sender
+ }
+ if(! $deliveries)
+ continue;
+ if($i['message']) {
+ if($i['message']['type'] === 'activity') {
+ // process the message
+ }
+ elseif($i['message']['type'] === 'mail') {
+ }
}
}
}
diff --git a/version.inc b/version.inc
index a28c146b8..60df03c69 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2012-11-19.144
+2012-11-25.150