);
if(count($x)) {
+ if($owner['page-flags'] == PAGE_COMMUNITY && ! $x[0]['writable']) {
+ q("update contact set writable = 1 where id = %d limit 1",
+ intval($x[0]['id'])
+ );
+ $x[0]['writable'] = 1;
+ }
+
require_once('library/simplepie/simplepie.inc');
logger('mod-delivery: local delivery');
local_delivery($x[0],$atom);
// now change this copy of the post to a forum head message and deliver to all the tgroup members
- q("update item set wall = 1, origin = 1, forum_mode = 1 where id = %d limit 1",
+ $c = q("select name, url, thumb from contact where self = 1 and uid = %d limit 1",
+ intval($u[0]['uid'])
+ );
+ if(! count($c))
+ return;
+
+ q("update item set wall = 1, origin = 1, forum_mode = 1, `owner-name` = '%s', `owner-link` = '%s', `owner-avatar` = '%s' where id = %d limit 1",
+ dbesc($c[0]['name']),
+ dbesc($c[0]['url']),
+ dbesc($c[0]['thumb']),
intval($item_id)
);
$a = get_app();
- if((! strlen($contact['issued-id'])) && (! $contact['duplex']) && (! ($owner['page-flags'] == PAGE_COMMUNITY)))
- return 3;
+// if((! strlen($contact['issued-id'])) && (! $contact['duplex']) && (! ($owner['page-flags'] == PAGE_COMMUNITY)))
+// return 3;
$idtosend = $orig_id = (($contact['dfrn-id']) ? $contact['dfrn-id'] : $contact['issued-id']);
$final_dfrn_id = '';
- if(($contact['duplex'] && strlen($contact['pubkey'])) || ($owner['page-flags'] == PAGE_COMMUNITY && strlen($contact['pubkey']))) {
+ if(($contact['duplex'] && strlen($contact['pubkey']))
+ || ($owner['page-flags'] == PAGE_COMMUNITY && strlen($contact['pubkey']))
+ || ($contact['rel'] == CONTACT_IS_SHARING && strlen($contact['pubkey']))) {
openssl_public_decrypt($sent_dfrn_id,$final_dfrn_id,$contact['pubkey']);
openssl_public_decrypt($challenge,$postvars['challenge'],$contact['pubkey']);
}
if($dfrn_version >= 2.1) {
- if(($contact['duplex'] && strlen($contact['pubkey'])) || ($owner['page-flags'] == PAGE_COMMUNITY && strlen($contact['pubkey']))) {
+ if(($contact['duplex'] && strlen($contact['pubkey']))
+ || ($owner['page-flags'] == PAGE_COMMUNITY && strlen($contact['pubkey']))
+ || ($contact['rel'] == CONTACT_IS_SHARING && strlen($contact['pubkey']))) {
+
openssl_public_encrypt($key,$postvars['key'],$contact['pubkey']);
}
else {
$deny_people = expand_acl($parent['deny_cid']);
$deny_groups = expand_groups(expand_acl($parent['deny_gid']));
- // if our parent is a forum, uplink to the origonal author causing
+ // if our parent is a forum, uplink to the origional author causing
// a delivery fork
if(intval($parent['forum_mode']) && (! $top_level) && ($cmd !== 'uplink')) {
);
if(count($x)) {
+
+ if($owner['page-flags'] == PAGE_COMMUNITY && ! $x[0]['writable']) {
+ q("update contact set writable = 1 where id = %d limit 1",
+ intval($x[0]['id'])
+ );
+ $x[0]['writable'] = 1;
+ }
+
require_once('library/simplepie/simplepie.inc');
logger('mod-delivery: local delivery');
local_delivery($x[0],$atom);