aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorjeroenpraat <jeroenpraat@xs4all.nl>2014-06-05 14:00:05 +0000
committerjeroenpraat <jeroenpraat@xs4all.nl>2014-06-05 14:00:05 +0000
commit6ccf6455c4691ca2e90403ff9fbaa21b86512190 (patch)
treed997ab65cffdf4136e6b56c3297dd028cfe9b2c1 /include/items.php
parentd9688e5ab3bb1c33e432a14ac3455ecb7ca3a6b2 (diff)
parent48f856e84cb117b6224ae7a1e0cac30070f1af24 (diff)
downloadvolse-hubzilla-6ccf6455c4691ca2e90403ff9fbaa21b86512190.tar.gz
volse-hubzilla-6ccf6455c4691ca2e90403ff9fbaa21b86512190.tar.bz2
volse-hubzilla-6ccf6455c4691ca2e90403ff9fbaa21b86512190.zip
Merge branch 'master' of https://github.com/friendica/red
Diffstat (limited to 'include/items.php')
-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.