' @\1.bsky.social',
'/\ @([\w\d]+)@([\w\d_\-\.]+)/' => ' @\1',
'/\ @([\w\d]+)/' => ' @\1'
);
foreach ($data['links'] as &$value) {
foreach($patterns as $nic => $link) {
$value['description'] = preg_replace($nic, $link, $value['description']);
}
}
return $data;
}