Fixes #225 - Use a properly defined user agent

* Set a proper user agent
* Add fallback when UA comes out nil
* Remove unused Bundle extension
* Return nil when asciification fails
* Add whitespace handling and further emoji test case
* Explicitly check if string is already in ASCII
* Rename factory to builder
* Use allSatisfy instead of reduce
* Use key path syntax
This commit is contained in:
Johannes Marbach
2022-10-28 16:11:10 +02:00
committed by GitHub
parent ba4064cc2c
commit 09b2f939ab
12 changed files with 306 additions and 57 deletions
@@ -109,7 +109,8 @@ class UserSessionStore: UserSessionStoreProtocol {
let builder = ClientBuilder()
.basePath(path: baseDirectory.path)
.username(username: credentials.userID)
.userAgent(userAgent: UserAgentBuilder.makeASCIIUserAgent() ?? "unknown")
do {
let client: Client = try await Task.dispatch(on: .global()) {
let client = try builder.build()