~redstrate/public-inbox

astra: Fixing connection to a Sapphire Server v1 APPLIED

Currently when trying to connect to a sapphire server a connection to
the server is never able to made because the scheme is already in the
URL, and the GUI expects that the protocol is included in the settings
tab. This patch fixes it.

Toofy (1):
  Adding fix for connecting to a sapphire server

 launcher/core/src/sapphirelauncher.cpp | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

-- 
2.34.5
Thank you for your patch! It's been a while since I was able to test Sapphire 
myself. Applied to main.
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~redstrate/public-inbox/patches/38202/mbox | git am -3
Learn more about email & git

[PATCH astra 1/1] Adding fix for connecting to a sapphire server Export this patch

From: Toofy <mostafa.alsari@gmail.com>

---
 launcher/core/src/sapphirelauncher.cpp | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/launcher/core/src/sapphirelauncher.cpp b/launcher/core/src/sapphirelauncher.cpp
index f6ed125..1c7a3d2 100644
--- a/launcher/core/src/sapphirelauncher.cpp
+++ b/launcher/core/src/sapphirelauncher.cpp
@@ -39,10 +39,7 @@ void SapphireLauncher::login(const QString& lobbyUrl, const LoginInformation& in

void SapphireLauncher::registerAccount(const QString& lobbyUrl, const LoginInformation& info) {
    QJsonObject data{{"username", info.username}, {"pass", info.password}};
    QUrl url;
    url.setScheme("http");
    url.setHost(lobbyUrl);
    url.setPath("/sapphire-api/lobby/createAccount");
    QUrl url(lobbyUrl + "/sapphire-api/lobby/login");

    QNetworkRequest request(url);
    request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");
@@ -59,4 +56,4 @@ void SapphireLauncher::registerAccount(const QString& lobbyUrl, const LoginInfor

        window.launchGame(*info.settings, auth);
    });
}
\ No newline at end of file
}
-- 
2.34.5
Thank you for your patch! It's been a while since I was able to test Sapphire 
myself. Applied to main.