Fix resolving communities from non-home instance URLs

This commit is contained in:
Balazs Toldi 2023-08-15 08:23:14 +02:00
parent a82f2b68e3
commit dce5a8d89c
No known key found for this signature in database
GPG Key ID: 6C7D440036F99D58

View File

@ -5,7 +5,7 @@ public class LemmyUtils {
String[] splitURL = url.split("/");
String userName = splitURL[splitURL.length - 1];
String domain = splitURL[2];
return userName + "@" + domain;
return (userName.contains("@")) ? userName : userName + "@" + domain;
}
public static String qualifiedCommunityName2ActorId(String qualifiedName) {