aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-06-04 22:15:52 -0700
committerfriendica <info@friendica.com>2014-06-04 22:15:52 -0700
commit8084fed8511329237c2c44b33c13d81da76a153b (patch)
tree03f5e129e49f089e784568359b75ee5ab30a342c /include
parent41904545ad60d1ef97d207580a687268de869387 (diff)
downloadvolse-hubzilla-8084fed8511329237c2c44b33c13d81da76a153b.tar.gz
volse-hubzilla-8084fed8511329237c2c44b33c13d81da76a153b.tar.bz2
volse-hubzilla-8084fed8511329237c2c44b33c13d81da76a153b.zip
poke notifications
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index 1c44b7df5..c0a3a741e 100755
--- a/include/items.php
+++ b/include/items.php
@@ -2334,6 +2334,34 @@ function tag_deliver($uid,$item_id) {
}
+ if (stristr($item['verb'],ACTIVITY_POKE)) {
+ $poke_notify = true;
+
+ if(($item['obj_type'] == "") || ($item['obj_type'] !== ACTIVITY_OBJ_PERSON) || (! $item['object']))
+ $poke_notify = false;
+
+ $obj = json_decode_plus($item['object']);
+ if($obj) {
+ if($obj['id'] !== $u[0]['channel_hash'])
+ $poke_notify = false;
+ }
+
+ $verb = urldecode(substr($item['verb'],strpos($item['verb'],'#')+1));
+ if($poke_notify) {
+ require_once('include/enotify.php');
+ notification(array(
+ 'to_xchan' => $u[0]['channel_hash'],
+ 'from_xchan' => $item['author_xchan'],
+ 'type' => NOTIFY_POKE,
+ 'item' => $item,
+ 'link' => $i[0]['llink'],
+ 'verb' => ACTIVITY_POKE,
+ 'activity' => $verb,
+ 'otype' => 'item'
+ ));
+ }
+ }
+
if($item['obj_type'] === ACTIVITY_OBJ_TAGTERM) {
// We received a community tag activity for a post.