diff --git a/client/server.go b/client/server.go index 1a1f1eb..2da7b3f 100644 --- a/client/server.go +++ b/client/server.go @@ -55,7 +55,7 @@ func CreateServerFromUid(uid string) *Server { // CreateServerFromMeowUrl creates a server from a meow url, ex : meow://mylogin:mypassword@https://my.meowserver.example:8443/meow/ func CreateServerFromMeowUrl(meowurl string) *Server { - uid := strings.Split(meowurl, "://")[1] + uid := meowurl[7:] return CreateServerFromUid(uid) } @@ -65,7 +65,7 @@ func CreateServerFromInvitationLink(meowurl string) *Server { meowurlTable := strings.Split(meowurl, "/") // join all elements with / except the last one uid := strings.Join(meowurlTable[:len(meowurlTable)-1], "/") - return CreateServerFromUid(uid) + return CreateServerFromMeowUrl(uid) } // GetServerCard returns a server card from a server