From 1398c6040a55be28d803f29ac6d45afac1a643f8 Mon Sep 17 00:00:00 2001 From: ycc Date: Tue, 26 Mar 2024 15:15:41 +0100 Subject: [PATCH] moewurl bugfixes --- client/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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