浏览代码

Update Nickname lexer

Daniel Supernault 7 年之前
父节点
当前提交
e96fa8ce72
共有 1 个文件被更改,包括 4 次插入0 次删除
  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']);