aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-04-30 04:11:42 -0700
committerfriendica <info@friendica.com>2012-04-30 04:11:42 -0700
commit5d10672fb84e467a09c31cc06a21cc10d4082a48 (patch)
tree01e70f6661fdd2c630c108621c0fc56a91687d1a
parent9f18c9d664d44ce4d2bfe092bf1a8a154d31ac5f (diff)
downloadvolse-hubzilla-5d10672fb84e467a09c31cc06a21cc10d4082a48.tar.gz
volse-hubzilla-5d10672fb84e467a09c31cc06a21cc10d4082a48.tar.bz2
volse-hubzilla-5d10672fb84e467a09c31cc06a21cc10d4082a48.zip
fix join group notifications
-rw-r--r--mod/dfrn_confirm.php9
-rw-r--r--mod/dfrn_request.php3
2 files changed, 7 insertions, 5 deletions
diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php
index 6f7b925ac..f27c29daf 100644
--- a/mod/dfrn_confirm.php
+++ b/mod/dfrn_confirm.php
@@ -207,7 +207,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
if($duplex == 1)
$params['duplex'] = 1;
- if($user['page-flags'] == PAGE_COMMUNITY)
+ if($user[0]['page-flags'] == PAGE_COMMUNITY)
$params['page'] = 1;
logger('dfrn_confirm: Confirm: posting data to ' . $dfrn_confirm . ': ' . print_r($params,true), LOGGER_DATA);
@@ -436,7 +436,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
$forum_type = false;
- if($user['page-flags'] == PAGE_SOAPBOX || $user['page-flags'] == PAGE_COMMUNITY)
+ if($user[0]['page-flags'] == PAGE_SOAPBOX || $user[0]['page-flags'] == PAGE_COMMUNITY)
$forum_type = true;
if((isset($new_relation) && $new_relation == CONTACT_IS_FRIEND) || ($forum_type)) {
@@ -452,6 +452,8 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
$r = q("SELECT `hide-friends` FROM `profile` WHERE `uid` = %d AND `is-default` = 1 LIMIT 1",
intval($uid)
);
+
+
if((count($r)) && ($activity) && (! $hidden)) {
require_once('include/items.php');
@@ -483,13 +485,12 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
if($forum_type) {
$arr['verb'] = ACTIVITY_JOIN;
$arr['object-type'] = ACTIVITY_OBJ_GROUP;
- $arr['body'] = sprintf( t('%1$s joined %2$s'), $B, $A)."\n\n\n".$APhoto;
+ $arr['body'] = sprintf( t('%1$s welcomes new member %2$s'), $A, $B)."\n\n\n" .$BPhoto;
$arr['object'] = '<object><type>' . ACTIVITY_OBJ_GROUP . '</type><title>' . $self[0]['name'] . '</title>'
. '<id>' . $self[0]['url'] . '/' . $self[0]['name'] . '</id>';
$arr['object'] .= '<link>' . xmlify('<link rel="alternate" type="text/html" href="' . $self[0]['url'] . '" />' . "\n");
$arr['object'] .= xmlify('<link rel="photo" type="image/jpeg" href="' . $self[0]['thumb'] . '" />' . "\n");
$arr['object'] .= '</link></object>' . "\n";
-
}
else {
$arr['verb'] = ACTIVITY_FRIEND;
diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php
index 18798aa15..2169c494c 100644
--- a/mod/dfrn_request.php
+++ b/mod/dfrn_request.php
@@ -700,7 +700,8 @@ function dfrn_request_content(&$a) {
'node' => $r[0]['nickname'],
'dfrn_id' => $r[0]['issued-id'],
'intro_id' => $intro[0]['id'],
- 'duplex' => (($r[0]['page-flags'] == PAGE_FREELOVE) ? 1 : 0)
+ 'duplex' => (($r[0]['page-flags'] == PAGE_FREELOVE) ? 1 : 0),
+ 'activity' => intval(get_pconfig($r[0]['uid'],'system','post_newfriend'))
);
dfrn_confirm_post($a,$handsfree);
}