mirror of
https://codeberg.org/secana/Forji.git
synced 2026-06-16 05:13:55 -07:00
fix: don't crash the background notification poll on an invalid instance URL (#54)
This commit is contained in:
parent
639812348b
commit
4f6803cc03
1 changed files with 3 additions and 1 deletions
|
|
@ -87,7 +87,9 @@ final class BackgroundDownloadManager: NSObject, Sendable {
|
|||
for: instance.serverURL, username: instance.username,
|
||||
) else { return nil }
|
||||
|
||||
var components = URLComponents(string: "\(instance.serverURL)/api/v1/notifications")!
|
||||
guard var components = URLComponents(string: "\(instance.serverURL)/api/v1/notifications") else {
|
||||
return nil
|
||||
}
|
||||
components.queryItems = [
|
||||
URLQueryItem(name: "status-types", value: "unread"),
|
||||
URLQueryItem(name: "page", value: "1"),
|
||||
|
|
|
|||
Loading…
Reference in a new issue