aboutsummaryrefslogtreecommitdiffstats
path: root/include/diaspora.php
diff options
context:
space:
mode:
authorSimon L'nu <simon.lnu@gmail.com>2012-03-16 13:28:22 -0400
committerSimon L'nu <simon.lnu@gmail.com>2012-03-16 13:28:22 -0400
commita8c1cbc65592b58beb2042defa476acdd27fe8fd (patch)
tree0476b132c4cb6dc74dae9cbf493db258610cc9e3 /include/diaspora.php
parente21bf3341b89363207271d42e2d1163639b06d12 (diff)
parent28f941193d75ca12f4cb2a38a1c60e60ad10f2a6 (diff)
downloadvolse-hubzilla-a8c1cbc65592b58beb2042defa476acdd27fe8fd.tar.gz
volse-hubzilla-a8c1cbc65592b58beb2042defa476acdd27fe8fd.tar.bz2
volse-hubzilla-a8c1cbc65592b58beb2042defa476acdd27fe8fd.zip
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master: syntax error from pasted text, remove ^M's bug #335 network search broken after new ssl policy settings whitespace notification for disapora comments * 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..19bba5216 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'] . '/' . $posted_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;
}