Diaspora: Auto-adding users as friend who already sharing with us
This commit is contained in:
parent
452ff19d73
commit
7ab335c9d6
|
@ -752,6 +752,20 @@ function diaspora_request($importer,$xml) {
|
|||
}
|
||||
|
||||
function diaspora_post_allow($importer,$contact) {
|
||||
|
||||
// perhaps we were already sharing with this person. Now they're sharing with us.
|
||||
// That makes us friends.
|
||||
// Normally this should have handled by getting a request - but this could get lost
|
||||
if($contact['rel'] == CONTACT_IS_FOLLOWER && $importer['page-flags'] != PAGE_COMMUNITY) {
|
||||
q("UPDATE `contact` SET `rel` = %d, `writable` = 1 WHERE `id` = %d AND `uid` = %d LIMIT 1",
|
||||
intval(CONTACT_IS_FRIEND),
|
||||
intval($contact['id']),
|
||||
intval($importer['uid'])
|
||||
);
|
||||
$contact['rel'] = CONTACT_IS_FRIEND;
|
||||
logger('diaspora_post_allow: defining user '.$contact["nick"].' as friend');
|
||||
}
|
||||
|
||||
if(($contact['blocked']) || ($contact['readonly']) || ($contact['archive']))
|
||||
return false;
|
||||
if($contact['rel'] == CONTACT_IS_SHARING || $contact['rel'] == CONTACT_IS_FRIEND)
|
||||
|
|
|
@ -367,6 +367,7 @@ function lrdd($uri, $debug = false) {
|
|||
logger('lrdd: constructed url: ' . $url);
|
||||
|
||||
$xml = fetch_url($url);
|
||||
|
||||
$headers = $a->get_curl_headers();
|
||||
|
||||
if (! $xml)
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
{{ else }}
|
||||
<!-- <div class="profile-edit-side-div"><a class="profile-edit-side-link icon edit" title="$editprofile" href="profiles/$profid" ></a></div> -->
|
||||
<div class="profile-edit-side-div"><a class="profile-edit-side-link icon edit" title="$editprofile" href="profiles" ></a></div>
|
||||
{{ endif }}
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user