aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-08-14 05:23:36 -0700
committerFriendika <info@friendika.com>2011-08-14 05:23:36 -0700
commitfcf6651299418f834076649f1fad4833476aad76 (patch)
tree30bdedd2725a4c9e0ce7b21458740d68c170439b /mod
parent1b8adf0f12824dad695847edc32c659e0dc6f887 (diff)
downloadvolse-hubzilla-fcf6651299418f834076649f1fad4833476aad76.tar.gz
volse-hubzilla-fcf6651299418f834076649f1fad4833476aad76.tar.bz2
volse-hubzilla-fcf6651299418f834076649f1fad4833476aad76.zip
add diaspora support to dfrn_confirm (friendship confirmation)
Diffstat (limited to 'mod')
-rw-r--r--mod/dfrn_confirm.php24
1 files changed, 14 insertions, 10 deletions
diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php
index bcc4e3438..f0c86910b 100644
--- a/mod/dfrn_confirm.php
+++ b/mod/dfrn_confirm.php
@@ -124,6 +124,8 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
$aes_allow = $contact['aes_allow'];
$network = ((strlen($contact['issued-id'])) ? 'dfrn' : 'stat');
+ if($contact['network'])
+ $network = $contact['network'];
if($network === 'dfrn') {
@@ -339,16 +341,18 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
else {
// $network !== 'dfrn'
- $notify = '';
- $poll = '';
-
- $arr = lrdd($contact['url']);
- if(count($arr)) {
- foreach($arr as $link) {
- if($link['@attributes']['rel'] === 'salmon')
- $notify = $link['@attributes']['href'];
- if($link['@attributes']['rel'] === NAMESPACE_FEED)
- $poll = $link['@attributes']['href'];
+ $notify = (($contact['notify']) ? $contact['notify'] : '');
+ $poll = (($contact['poll']) ? $contact['poll'] : '');
+
+ if((! $contact['notify']) || (! $contact['poll'])) {
+ $arr = lrdd($contact['url']);
+ if(count($arr)) {
+ foreach($arr as $link) {
+ if($link['@attributes']['rel'] === 'salmon')
+ $notify = $link['@attributes']['href'];
+ if($link['@attributes']['rel'] === NAMESPACE_FEED)
+ $poll = $link['@attributes']['href'];
+ }
}
}