diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index e71d7b99bf..aca66a5536 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -62,6 +62,7 @@ jobs: run: bundle exec fastlane test - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: unittests diff --git a/.github/workflows/ci-ui-tests.yml b/.github/workflows/ci-ui-tests.yml index 322323739e..f325b210f4 100644 --- a/.github/workflows/ci-ui-tests.yml +++ b/.github/workflows/ci-ui-tests.yml @@ -57,7 +57,7 @@ jobs: run: bundle exec fastlane uitest - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: uitests - \ No newline at end of file diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index d902ca1368..ae78b69088 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -25,7 +25,7 @@ jobs: with: # Additional arguments for the sonarcloud scanner args: - -Dsonar.projectKey=vector-im_element-ios - -Dsonar.organization=new_vector_ltd_organization + -Dsonar.projectKey=element-ios + -Dsonar.organization=element-hq -Dsonar.inclusions=RiotSwiftUI/** # For more info about the parameters, please refer to https://docs.sonarcloud.io/advanced-setup/analysis-parameters/ \ No newline at end of file diff --git a/CHANGES.md b/CHANGES.md index 11ffc24097..73dda9aeb2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,10 @@ +## Changes in 1.11.17 (2024-08-20) + +🙌 Improvements + +- Check power level before starting live sharing location ([#7808](https://github.com/element-hq/element-ios/pull/7808)) + + ## Changes in 1.11.16 (2024-07-23) No significant changes. diff --git a/Config/AppVersion.xcconfig b/Config/AppVersion.xcconfig index 084508c89d..92f56844f7 100644 --- a/Config/AppVersion.xcconfig +++ b/Config/AppVersion.xcconfig @@ -15,5 +15,5 @@ // // Version -MARKETING_VERSION = 1.11.16 -CURRENT_PROJECT_VERSION = 1.11.16 +MARKETING_VERSION = 1.11.17 +CURRENT_PROJECT_VERSION = 1.11.17 diff --git a/Podfile b/Podfile index f6f26f61c8..4035934fbc 100644 --- a/Podfile +++ b/Podfile @@ -61,7 +61,7 @@ abstract_target 'RiotPods' do pod 'SideMenu', '~> 6.5' pod 'DSWaveformImage', '~> 6.1.1' - pod 'FLEX', '~> 4.5.0', :configurations => ['Debug'], :inhibit_warnings => true + pod 'FLEX', '~> 5.22.10', :configurations => ['Debug'], :inhibit_warnings => true target 'RiotTests' do inherit! :search_paths diff --git a/Podfile.lock b/Podfile.lock index 6e3ce20f92..5131afefac 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -20,7 +20,7 @@ PODS: - Down (0.11.0) - DSBottomSheet (0.3.0) - DSWaveformImage (6.1.1) - - FLEX (4.5.0) + - FLEX (5.22.10) - FlowCommoniOS (1.12.2) - GBDeviceInfo (7.1.0): - GBDeviceInfo/Core (= 7.1.0) @@ -94,7 +94,7 @@ DEPENDENCIES: - Down (~> 0.11.0) - DSBottomSheet (~> 0.3) - DSWaveformImage (~> 6.1.1) - - FLEX (~> 4.5.0) + - FLEX (~> 5.22.10) - FlowCommoniOS (~> 1.12.0) - GBDeviceInfo (~> 7.1.0) - Introspect (~> 0.1) @@ -173,7 +173,7 @@ SPEC CHECKSUMS: Down: b6ba1bc985c9d2f4e15e3b293d2207766fa12612 DSBottomSheet: ca0ac37eb5af2dd54663f86b84382ed90a59be2a DSWaveformImage: 3c718a0cf99291887ee70d1d0c18d80101d3d9ce - FLEX: e51461dd6f0bfb00643c262acdfea5d5d12c596b + FLEX: f21ee4f498eed3f8a1eded66b21939fd3b7a22ce FlowCommoniOS: ca92071ab526dc89905495a37844fd7e78d1a7f2 GBDeviceInfo: 5d62fa85bdcce3ed288d83c28789adf1173e4376 GZIP: 3c0abf794bfce8c7cb34ea05a1837752416c8868 @@ -207,6 +207,6 @@ SPEC CHECKSUMS: zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5 -PODFILE CHECKSUM: b622ffadc1a0fe5442787bd9023ca3d110384814 +PODFILE CHECKSUM: 7e14a7efb021fca69b3ffc2ffbe5fe632e6df7ea COCOAPODS: 1.14.3 diff --git a/README.md b/README.md index 8ebf0f2c63..7a437e62c0 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ [![Build status](https://badge.buildkite.com/cc8f93e32da93fa7c1172398bd8af66254490567c7195a5f3f.svg?branch=develop)](https://buildkite.com/matrix-dot-org/element-ios/builds?branch=develop) [![Weblate](https://translate.riot.im/widgets/riot-ios/-/svg-badge.svg)](https://translate.riot.im/engage/riot-ios/?utm_source=widget) [![codecov](https://codecov.io/gh/element-hq/element-ios/branch/develop/graph/badge.svg?token=INNm5o6XWg)](https://codecov.io/gh/element-hq/element-ios) -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=vector-im_element-ios&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=vector-im_element-ios) -[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=vector-im_element-ios&metric=bugs)](https://sonarcloud.io/summary/new_code?id=vector-im_element-ios) -[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=vector-im_element-ios&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=vector-im_element-ios) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=element-ios&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=element-ios) +[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=element-ios&metric=bugs)](https://sonarcloud.io/summary/new_code?id=element-ios) +[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=element-ios&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=element-ios) [![Element iOS Matrix room #element-ios:matrix.org](https://img.shields.io/matrix/element-ios:matrix.org.svg?label=%23element-ios:matrix.org&logo=matrix&server_fqdn=matrix.org)](https://matrix.to/#/#element-ios:matrix.org) ![GitHub](https://img.shields.io/github/license/element-hq/element-ios) [![Twitter URL](https://img.shields.io/twitter/url?label=Element&url=https%3A%2F%2Ftwitter.com%2Felement_hq)](https://twitter.com/element_hq) @@ -17,7 +17,7 @@ Element iOS is an iOS [Matrix](https://matrix.org/) client provided by [Element]
diff --git a/RiotSwiftUI/Modules/LocationSharing/StartLocationSharing/Coordinator/LocationSharingCoordinator.swift b/RiotSwiftUI/Modules/LocationSharing/StartLocationSharing/Coordinator/LocationSharingCoordinator.swift index 9cd5853c74..c2494be129 100644 --- a/RiotSwiftUI/Modules/LocationSharing/StartLocationSharing/Coordinator/LocationSharingCoordinator.swift +++ b/RiotSwiftUI/Modules/LocationSharing/StartLocationSharing/Coordinator/LocationSharingCoordinator.swift @@ -166,17 +166,16 @@ final class LocationSharingCoordinator: Coordinator, Presentable { // Check if user can send beacon info state event private func canShareLiveLocation() -> Bool { - guard let myUserId = parameters.roomDataSource.mxSession.myUserId else { + guard let myUserId = parameters.roomDataSource.mxSession.myUserId, + let roomPowerLevels = parameters.roomDataSource.roomState.powerLevels, + let userPowerLevel = RoomPowerLevel(rawValue: roomPowerLevels.powerLevelOfUser(withUserID: myUserId)) else { return false } - let userPowerLevelRawValue = parameters.roomDataSource.roomState.powerLevels.powerLevelOfUser(withUserID: myUserId) - - guard let userPowerLevel = RoomPowerLevel(rawValue: userPowerLevelRawValue) else { - return false - } - - return userPowerLevel.rawValue >= RoomPowerLevel.moderator.rawValue + // CHeck user power level in room against power level needed to post geolocation state event. + let liveSharingPowerLevel = roomPowerLevels.minimumPowerLevelForSendingStateEvent(.beaconInfo) + + return userPowerLevel.rawValue >= liveSharingPowerLevel } private func showLabFlagPromotionIfNeeded(completion: @escaping ((Bool) -> Void)) { diff --git a/matrix-ios-sdk b/matrix-ios-sdk index 1c4b3f5c32..1f3fa5aa79 160000 --- a/matrix-ios-sdk +++ b/matrix-ios-sdk @@ -1 +1 @@ -Subproject commit 1c4b3f5c32ed3bcf27d3404c770e000a50417352 +Subproject commit 1f3fa5aa795c4610f62f0c3fabd91521c4bfd257