Skip to content

Commit

Permalink
Check with Stable then Unstable event keys
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasBuquet committed May 16, 2024
1 parent db5beb5 commit e1e073c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ final class LocationSharingCoordinator: Coordinator, Presentable {
//
// let liveSharingPowerLevel = parameters.roomDataSource.roomState.powerLevels.minimumPowerLevelForSendingStateEvent(.beaconInfo)
//
let liveSharingPowerLevel = roomPowerLevels.events[kMXEventTypeStringBeaconInfoMSC3672] as? Int ?? roomPowerLevels.stateDefault

// Get live sharing power level from stable value, then unstable value and fallback on default value.
let liveSharingPowerLevel = (roomPowerLevels.events[kMXEventTypeStringBeaconInfo] ?? roomPowerLevels.events[kMXEventTypeStringBeaconInfoMSC3672]) as? Int ?? roomPowerLevels.stateDefault

return userPowerLevel.rawValue >= liveSharingPowerLevel
}
Expand Down

0 comments on commit e1e073c

Please sign in to comment.