aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dfrn_request.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/dfrn_request.php')
-rw-r--r--mod/dfrn_request.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php
index b6ae4346d..7fb55c4bf 100644
--- a/mod/dfrn_request.php
+++ b/mod/dfrn_request.php
@@ -166,6 +166,15 @@ function dfrn_request_post(&$a) {
return;
}
+ if(strstr($url,'@')) {
+ $username = substr($url,0,strpos($url,'@'));
+ $hostname = substr($url,strpos($url,'@') + 1);
+ require_once('Scrape.php');
+
+ $parms = scrape_meta('http://' . $url);
+ if((x($parms,'dfrn-template')) && strstr($parms['dfrn-template'],'%s'))
+ $url = sprintf($parms['dfrn-template'],$username);
+ }
$ret = q("SELECT * FROM `contact` WHERE `uid` = %d AND `url` = '%s' LIMIT 1",
intval($uid),