]> git.mxchange.org Git - friendica.git/blobdiff - mod/dfrn_request.php
style tabs
[friendica.git] / mod / dfrn_request.php
index b6ae4346d2447499e0840257906178c65f058890..7fb55c4bfe13d164a6b1520f9be3c91b67c5e6c7 100644 (file)
@@ -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),