fix(unofficial-quote-toots): ignore youtube links

Youtube links look a lot like fediverse links, so we added a special rule for it, just in case. This may mitigate the too many requests problems we are facing.
This commit is contained in:
LucasGGamerM
2025-03-09 19:38:18 -03:00
parent 28097554a7
commit b52f1c156d

View File

@@ -1183,6 +1183,10 @@ public class UiUtils {
return false;
}
// Akkoma somehow makes this necessary, because youtube links look like posts. And because it may trigger too many requests.
if (uri.getHost().toLowerCase().contains("youtube.com") || uri.getHost().toLowerCase().contains("youtu.be"))
return false;
if (uri.getQuery() != null || uri.getFragment() != null || uri.getPath() == null)
return false;