aboutsummaryrefslogtreecommitdiffstats
path: root/include/diaspora.php
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2012-03-17 01:49:17 +0100
committerzottel <github@zottel.net>2012-03-17 01:49:17 +0100
commitc56e3c5dd4bcbb949282fd3b4c065ccfd4673726 (patch)
treec4574eae6f2aaf68c50ccc1022944e0e1c45760b /include/diaspora.php
parentea4c806c5c3adacb6ef585de657e5f34c2e24c98 (diff)
parent8af36b92bb3a78235f5741c764d034dc66b959b2 (diff)
downloadvolse-hubzilla-c56e3c5dd4bcbb949282fd3b4c065ccfd4673726.tar.gz
volse-hubzilla-c56e3c5dd4bcbb949282fd3b4c065ccfd4673726.tar.bz2
volse-hubzilla-c56e3c5dd4bcbb949282fd3b4c065ccfd4673726.zip
Merge remote branch 'upstream/master'
Diffstat (limited to 'include/diaspora.php')
-rwxr-xr-xinclude/diaspora.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index dca857a19..1b5af42cd 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -1159,6 +1159,48 @@ function diaspora_comment($importer,$xml,$msg) {
proc_run('php','include/notifier.php','comment',$message_id);
}
+
+ $myconv = q("SELECT `author-link`, `author-avatar`, `parent` FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `parent` != 0 ",
+ dbesc($parent_item['uri']),
+ intval($importer['uid'])
+ );
+
+ if(count($myconv)) {
+ $importer_url = $a->get_baseurl() . '/profile/' . $importer['nickname'];
+
+ foreach($myconv as $conv) {
+
+ // now if we find a match, it means we're in this conversation
+
+ if(! link_compare($conv['author-link'],$importer_url))
+ continue;
+
+ require_once('include/enotify.php');
+
+ $conv_parent = $conv['parent'];
+
+ notification(array(
+ 'type' => NOTIFY_COMMENT,
+ 'notify_flags' => $importer['notify-flags'],
+ 'language' => $importer['language'],
+ 'to_name' => $importer['username'],
+ 'to_email' => $importer['email'],
+ 'uid' => $importer['uid'],
+ 'item' => $datarray,
+ 'link' => $a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $message_id,
+ 'source_name' => $datarray['author-name'],
+ 'source_link' => $datarray['author-link'],
+ 'source_photo' => $datarray['author-avatar'],
+ 'verb' => ACTIVITY_POST,
+ 'otype' => 'item',
+ 'parent' => $conv_parent,
+
+ ));
+
+ // only send one notification
+ break;
+ }
+ }
return;
}