Widgets: Check user permission before opening a widget (data part)

#2833
This commit is contained in:
manuroe
2019-11-22 11:18:08 +01:00
parent 11ad429ba4
commit 2f6c74e0de
6 changed files with 181 additions and 11 deletions
@@ -20,10 +20,14 @@ import Foundation
/// https://github.com/vector-im/riot-meta/blob/master/spec/settings.md#tracking-which-widgets-the-user-has-allowed-to-load
struct RiotSettingAllowedWidgets {
let widgets: [String: Bool]
// Widget type -> Server domain -> Bool
let nativeWidgets: [String: [String: Bool]]
}
extension RiotSettingAllowedWidgets: Decodable {
enum CodingKeys: String, CodingKey {
case widgets
case nativeWidgets = "native_widgets"
}
}