mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 07:28:28 +02:00
MESSENGER-5892 activate federation with wellknown
This commit is contained in:
@@ -50,4 +50,15 @@ struct WellknownFederation: Decodable {
|
||||
case showIntroduction = "show_introduction"
|
||||
case enable
|
||||
}
|
||||
|
||||
init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
enable = try? container.decode(Bool.self, forKey: .enable)
|
||||
showIntroduction = try? container.decode(Bool.self, forKey: .showIntroduction)
|
||||
showAnnouncement = try? container.decode(Bool.self, forKey: .showAnnouncement)
|
||||
|
||||
// Save federation status in userDetaults
|
||||
BWIBuildSettings.shared.isWellknownFederationEnabled = enable ?? false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user