Release 2.0.0

This commit is contained in:
Frank Rotermund
2022-11-27 13:18:53 +00:00
parent bf57719009
commit 0dc8ec0982
570 changed files with 20366 additions and 4410 deletions
+6 -6
View File
@@ -50,11 +50,11 @@ extension UserLabelDefaultService : UserLabelService {
return
}
if state.powerLevels.events[BwiBuildSettings.bwiUserLabelEventTypeString] == nil {
if state.powerLevels.events[BWIBuildSettings.shared.bwiUserLabelEventTypeString] == nil {
if var newContent = state.powerLevels.jsonDictionary() as? [String : Any] {
if var events = newContent["events"] as? [String : Any] {
events[BwiBuildSettings.bwiUserLabelEventTypeString] = RoomPowerLevel.admin.rawValue
events[BWIBuildSettings.shared.bwiUserLabelEventTypeString] = RoomPowerLevel.admin.rawValue
newContent["events"] = events
room.sendStateEvent(.roomPowerLevels, content: newContent, stateKey: "", completion: { response in
@@ -68,20 +68,20 @@ extension UserLabelDefaultService : UserLabelService {
}
}
if var currentLabel = state.stateEvents(with: .custom(BwiBuildSettings.bwiUserLabelEventTypeString))?.last?.content {
if var currentLabel = state.stateEvents(with: .custom(BWIBuildSettings.shared.bwiUserLabelEventTypeString))?.last?.content {
if userLabel != nil {
currentLabel[user] = userLabel
} else {
currentLabel.removeValue(forKey: user)
}
room.sendStateEvent(.custom(BwiBuildSettings.bwiUserLabelEventTypeString), content: currentLabel, stateKey: "", completion: { response in
room.sendStateEvent(.custom(BWIBuildSettings.shared.bwiUserLabelEventTypeString), content: currentLabel, stateKey: "", completion: { response in
completion(response.isSuccess)
})
} else if userLabel != nil {
var newUserLabel = Dictionary<String, Any>()
newUserLabel[user] = userLabel
room.sendStateEvent(.custom(BwiBuildSettings.bwiUserLabelEventTypeString), content: newUserLabel, stateKey: "", completion: { response in
room.sendStateEvent(.custom(BWIBuildSettings.shared.bwiUserLabelEventTypeString), content: newUserLabel, stateKey: "", completion: { response in
completion(response.isSuccess)
})
}
@@ -100,7 +100,7 @@ extension UserLabelDefaultService : UserLabelService {
return
}
if let labels = state.stateEvents(with: .custom(BwiBuildSettings.bwiUserLabelEventTypeString))?.last?.content {
if let labels = state.stateEvents(with: .custom(BWIBuildSettings.shared.bwiUserLabelEventTypeString))?.last?.content {
if let tmp = labels[user] as? String {
label = tmp
}