mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 21:15:14 +00:00
store FEP-612d url as abook alias
This commit is contained in:
parent
55a26cd8c3
commit
c3e191c36a
1 changed files with 3 additions and 0 deletions
|
@ -25,11 +25,13 @@ class Connect
|
|||
{
|
||||
|
||||
$uid = $channel['channel_id'];
|
||||
$alias = '';
|
||||
|
||||
if (!str_contains($url, '@') && !str_contains($url, '/')) {
|
||||
if (str_contains($url,'.') && !str_contains(trim($url), ' ') && checkdnsrr('_apobjid.' . trim($url), 'TXT')) {
|
||||
$dnsRecord = dns_get_record('_apobjid.' . trim($url), DNS_TXT);
|
||||
if (isset($dnsRecord[0]['txt'])) {
|
||||
$alias = $url;
|
||||
$url = $dnsRecord[0]['txt'];
|
||||
}
|
||||
}
|
||||
|
@ -259,6 +261,7 @@ class Connect
|
|||
'abook_channel' => intval($uid),
|
||||
'abook_closeness' => intval($closeness),
|
||||
'abook_xchan' => $xchan_hash,
|
||||
'abook_alias' => $alias,
|
||||
'abook_profile' => $profile_assign,
|
||||
'abook_feed' => intval(($xchan['xchan_network'] === 'rss') ? 1 : 0),
|
||||
'abook_created' => Time::convert(),
|
||||
|
|
Loading…
Reference in a new issue