aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-12-03 12:27:54 -0800
committerFriendika <info@friendika.com>2010-12-03 12:27:54 -0800
commit4d5d93a9020c1750013ff3381da791db44c97eb2 (patch)
tree7b41109f02303dc769f1049bd0a9d1de4dc2d80c
parentfac04eda32198c81b8f6715fec291dfc780edb45 (diff)
downloadvolse-hubzilla-4d5d93a9020c1750013ff3381da791db44c97eb2.tar.gz
volse-hubzilla-4d5d93a9020c1750013ff3381da791db44c97eb2.tar.bz2
volse-hubzilla-4d5d93a9020c1750013ff3381da791db44c97eb2.zip
found the elusive comment box bug
-rw-r--r--mod/dfrn_notify.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php
index cd7523a01..958d747d0 100644
--- a/mod/dfrn_notify.php
+++ b/mod/dfrn_notify.php
@@ -245,6 +245,7 @@ function dfrn_notify_post(&$a) {
if($is_reply) {
if($feed->get_item_quantity() == 1) {
logger('dfrn_notify: received remote comment');
+ $is_like = false;
// remote reply to our post. Import and then notify everybody else.
$datarray = get_atom_elements($feed,$item);
$datarray['type'] = 'remote-comment';
@@ -253,12 +254,14 @@ function dfrn_notify_post(&$a) {
$datarray['uid'] = $importer['importer_uid'];
$datarray['contact-id'] = $importer['id'];
if(($datarray['verb'] == ACTIVITY_LIKE) || ($datarray['verb'] == ACTIVITY_DISLIKE)) {
+ $is_like = true;
$datarray['type'] = 'activity';
$datarray['gravity'] = GRAVITY_LIKE;
+ $datarray['last-child'] = 0;
}
$posted_id = item_store($datarray);
- if($posted_id) {
+ if(($posted_id) && (! $is_like)) {
$r = q("SELECT `parent` FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval($posted_id),
intval($importer['importer_uid'])
@@ -299,6 +302,9 @@ function dfrn_notify_post(&$a) {
$email_tpl,t("From: Administrator@") . $a->get_hostname() );
}
}
+
+ // TODO send notification mail about like/dislike, but we need a new notify pref for this
+
xml_status(0);
// NOTREACHED