Skip to content

Commit 85a7438

Browse files
Fix crash in server details
Some muc servers don't provide all details (name, type, category).
1 parent 06d9a51 commit 85a7438

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Monal/Classes/ServerDetails.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@ struct ServerDetails: View {
219219
result.append(
220220
EntryData(
221221
title: String(format: NSLocalizedString("Server: %@", comment: ""), entry["jid"] ?? "error"),
222-
description: String(format: NSLocalizedString("%@ (type '%@', category '%@')", comment: ""), entry["name"]!, entry["type"]!, entry["category"]!),
223-
status: entry["type"] == "text" ? .success : .normal
222+
description: String(format: NSLocalizedString("%@ (type '%@', category '%@')", comment: ""), entry["name"] ?? "<unknown name>", entry["type"] ?? "<unknown>", entry["category"] ?? "<unknown>"),
223+
status: entry["type"] ?? "<unknown"> == "text" ? .success : .normal
224224
)
225225
)
226226
}

0 commit comments

Comments
 (0)