From 6bf6fadaaadb473a8acff35dc6af4ccc69bc4355 Mon Sep 17 00:00:00 2001 From: ycc Date: Tue, 26 Mar 2024 15:29:52 +0100 Subject: [PATCH] fix invitation code separator --- client/server.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/server.go b/client/server.go index 763bd5b..c77ce5b 100644 --- a/client/server.go +++ b/client/server.go @@ -63,13 +63,13 @@ func CreateServerFromMeowUrl(meowurl string) *Server { return CreateServerFromUid(uid) } -// CreateServerFromInvitationLink creates a server from a meow url, ex : meow://mylogin:mypassword@https://my.meowserver.example:8443/meow/invitationCode +// CreateServerFromInvitationLink creates a server from a meow url, ex : meow://mylogin:mypassword@https://my.meowserver.example:8443/meow?invitationCode func CreateServerFromInvitationLink(meowurl string) *Server { // remove the invitation code, last token after a / - meowurlTable := strings.Split(meowurl, "/") + meowurlTable := strings.Split(meowurl, "?") // join all elements with / except the last one - uid := strings.Join(meowurlTable[:len(meowurlTable)-1], "/") - return CreateServerFromMeowUrl(uid) + meowSrvUrl := meowurlTable[0] + return CreateServerFromMeowUrl(meowSrvUrl) } // GetServerCard returns a server card from a server