Explorar o código

Update Nickname lexer

Daniel Supernault %!s(int64=7) %!d(string=hai) anos
pai
achega
e96fa8ce72
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      app/Util/Lexer/Nickname.php

+ 4 - 0
app/Util/Lexer/Nickname.php

@@ -6,6 +6,10 @@ class Nickname {
 
     public static function normalizeProfileUrl($url)
     {
+      if(starts_with($url, 'acct:')) {
+        $url = str_replace('acct:', '', $url);
+      }
+
       if(!str_contains($url, '@') && filter_var($url, FILTER_VALIDATE_URL)) {
         $parsed = parse_url($url);
         $username = str_replace(['/','\\','@'], '', $parsed['path']);