aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-02-16 18:29:09 -0800
committerfriendica <info@friendica.com>2012-02-16 18:29:09 -0800
commit2abbd81ce1760cdfd4098ae1d5cda29e608eb021 (patch)
treee21ac61730c1ed883f326beb6ed2caecd0e6405a /include/items.php
parent6f6d4471d817be7687a8ba9853c6757bd41be743 (diff)
downloadvolse-hubzilla-2abbd81ce1760cdfd4098ae1d5cda29e608eb021.tar.gz
volse-hubzilla-2abbd81ce1760cdfd4098ae1d5cda29e608eb021.tar.bz2
volse-hubzilla-2abbd81ce1760cdfd4098ae1d5cda29e608eb021.zip
a few fixes for offsite community members
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php24
1 files changed, 19 insertions, 5 deletions
diff --git a/include/items.php b/include/items.php
index 5e3f9a60a..1bf73bc36 100755
--- a/include/items.php
+++ b/include/items.php
@@ -999,7 +999,16 @@ function tag_deliver($uid,$item_id) {
// 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)
);
@@ -1016,8 +1025,8 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
$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']);
@@ -1068,7 +1077,9 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
$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']);
}
@@ -1111,7 +1122,10 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
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 {