Skip to content

Commit

Permalink
Resolve conflicts on Rebase/Element-v1.11.18 into Tchap
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasBuquet committed Sep 26, 2024
1 parent 7d851f0 commit 36258ee
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 93 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,7 @@ jobs:
- name: Unit tests
run: bundle exec fastlane test

<<<<<<< HEAD
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# flags: unittests
=======
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
>>>>>>> v1.11.18
4 changes: 2 additions & 2 deletions .github/workflows/ci-ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
run: bundle exec fastlane uitest

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: uitests

4 changes: 2 additions & 2 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
# Additional arguments for the sonarcloud scanner
args:
-Dsonar.projectKey=element-ios
-Dsonar.organization=element-hq
-Dsonar.projectKey=vector-im_element-ios
-Dsonar.organization=new_vector_ltd_organization
-Dsonar.inclusions=RiotSwiftUI/**
# For more info about the parameters, please refer to https://docs.sonarcloud.io/advanced-setup/analysis-parameters/
7 changes: 1 addition & 6 deletions Config/AppVersion.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,5 @@
//

// Version
<<<<<<< HEAD
MARKETING_VERSION = 2.8.1
MARKETING_VERSION = 2.8.2
CURRENT_PROJECT_VERSION = 1
=======
MARKETING_VERSION = 1.11.18
CURRENT_PROJECT_VERSION = 1.11.18
>>>>>>> v1.11.18
3 changes: 0 additions & 3 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ def import_Common_pods
pod 'DSWaveformImage', '~> 6.1.1'

pod 'FLEX', '~> 5.22.10', :configurations => ['Debug'], :inhibit_warnings => true
<<<<<<< HEAD
end
=======
>>>>>>> v1.11.18

abstract_target 'TchapPods' do

Expand Down
14 changes: 0 additions & 14 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,8 @@ PODS:
- Sentry/Core (7.15.0)
- SideMenu (6.5.0)
- SwiftBase32 (0.9.0)
<<<<<<< HEAD
- SwiftFormat/CLI (0.54.0)
- SwiftGen (6.6.2)
=======
- SwiftFormat/CLI (0.54.5)
- SwiftGen (6.6.3)
>>>>>>> v1.11.18
- SwiftJWT (3.6.200):
- BlueCryptor (~> 1.0)
- BlueECC (~> 1.1)
Expand Down Expand Up @@ -209,13 +204,8 @@ SPEC CHECKSUMS:
Sentry: 63ca44f5e0c8cea0ee5a07686b02e56104f41ef7
SideMenu: f583187d21c5b1dd04c72002be544b555a2627a2
SwiftBase32: 9399c25a80666dc66b51e10076bf591e3bbb8f17
<<<<<<< HEAD
SwiftFormat: 0e0b577434e6aa63bc82a8905b40d9597b8452d4
SwiftGen: 1366a7f71aeef49954ca5a63ba4bef6b0f24138c
=======
SwiftFormat: 543a7b1ab4a6ce2d88bd5616a17903446ca3dc5c
SwiftGen: 4993cbf71cbc4886f775e26f8d5c3a1188ec9f99
>>>>>>> v1.11.18
SwiftJWT: 88c412708f58c169d431d344c87bc79a87c830ae
SwiftLint: eb47480d47c982481592c195c221d11013a679cc
SwiftyBeaver: 84069991dd5dca07d7069100985badaca7f0ce82
Expand All @@ -225,10 +215,6 @@ SPEC CHECKSUMS:
zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c
ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5

<<<<<<< HEAD
PODFILE CHECKSUM: 971cd7529e2d127b237469afa2c18e6dced151ec
=======
PODFILE CHECKSUM: fb3e1c62f9e35a9bdbafce743664bf4f620af028
>>>>>>> v1.11.18

COCOAPODS: 1.15.2
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
![GitHub release (latest by date)](https://img.shields.io/github/v/release/dinsic-pim/tchap-ios)
![badge-languages](https://img.shields.io/badge/languages-Swift%20%7C%20ObjC-orange.svg)
[![Swift 5.x](https://img.shields.io/badge/Swift-5.x-orange)](https://developer.apple.com/swift)
<<<<<<< HEAD
![GitHub](https://img.shields.io/github/license/dinsic-pim/tchap-ios)
=======
[![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)
Expand All @@ -15,18 +12,12 @@
[![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)
>>>>>>> v1.11.18

Tchap iOS is an iOS [Matrix](https://matrix.org/) client. It is based on [MatrixSDK](https://github.com/matrix-org/matrix-ios-sdk).

<p align="center">
<<<<<<< HEAD
<a href=https://apps.apple.com/fr/app/tchap/id1446253779?mt=8>
<img alt="Download on the app store" src="https://linkmaker.itunes.apple.com/images/badges/en-us/badge_appstore-lrg.svg" width=160>
=======
<a href=https://itunes.apple.com/us/app/element/id1083446067?mt=8>
<img alt="Download on the app store" src="https://www.apple.com/lae/itunes/link/images/link_badge_appstore_large_2x.png" width=160>
>>>>>>> v1.11.18
</a>
</p>

Expand Down
16 changes: 8 additions & 8 deletions RiotNSE/BuildSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ final class BuildSettings: NSObject {

#if DEBUG
/// The configuration to use for analytics during development. Set `isEnabled` to false to disable analytics in debug builds.
static let analyticsConfiguration = AnalyticsConfiguration(isEnabled: false,
host: "",
apiKey: "",
termsURL: URL(string: "https://")!)
static let analyticsConfiguration = AnalyticsConfiguration(isEnabled: true, // Tchap: enable PostHog analytics on DEBUG
host: "https://us.i.posthog.com", // Tchap: dev posthog,
apiKey: "phc_eQOeaQiaIxdX9kaQmqYTD7RJLyFubYmGYKUI9czqqQD", // Tchap: dev posthog,
termsURL: URL(string: "https://tchap.beta.gouv.fr/politique-de-confidentialite")!) // Tchap: dev posthog,
#else
/// The configuration to use for analytics. Set `isEnabled` to false to disable analytics.
static let analyticsConfiguration = AnalyticsConfiguration(isEnabled: false,
Expand Down Expand Up @@ -292,10 +292,10 @@ final class BuildSettings: NSObject {
"agent.dev-durable.tchap.gouv.fr",
"agent.education.tchap.gouv.fr"
],
// No activation of video calls actually in Tchap Production.
// tchapFeatureVideoOverIP: [
// "agent.dinum.tchap.gouv.fr"
// ],
tchapFeatureVideoOverIP: [
"agent.dinum.tchap.gouv.fr",
"agent.education.tchap.gouv.fr"
],
tchapFeatureGeolocationSharing: [
tchapFeatureAnyHomeServer
]
Expand Down
20 changes: 10 additions & 10 deletions RiotShareExtension/BuildSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ final class BuildSettings: NSObject {

#if DEBUG
/// The configuration to use for analytics during development. Set `isEnabled` to false to disable analytics in debug builds.
static let analyticsConfiguration = AnalyticsConfiguration(isEnabled: false,
host: "",
apiKey: "",
termsURL: URL(string: "https://")!)
static let analyticsConfiguration = AnalyticsConfiguration(isEnabled: true, // Tchap: enable PostHog analytics on DEBUG
host: "https://us.i.posthog.com", // Tchap: dev posthog,
apiKey: "phc_eQOeaQiaIxdX9kaQmqYTD7RJLyFubYmGYKUI9czqqQD", // Tchap: dev posthog,
termsURL: URL(string: "https://tchap.beta.gouv.fr/politique-de-confidentialite")!) // Tchap: dev posthog,
#else
/// The configuration to use for analytics. Set `isEnabled` to false to disable analytics.
static let analyticsConfiguration = AnalyticsConfiguration(isEnabled: false,
Expand Down Expand Up @@ -272,15 +272,15 @@ final class BuildSettings: NSObject {
tchapFeatureNotificationByEmail: [
tchapFeatureAnyHomeServer
],
// Audio calls for all except Finances in Tchap Production.
// Audio calls for all in Tchap Production.
tchapFeatureVoiceOverIP: [
"agent.externe.tchap.gouv.fr",
"agent.collectivites.tchap.gouv.fr",
"agent.tchap.gouv.fr",
"agent.elysee.tchap.gouv.fr",
"agent.pm.tchap.gouv.fr",
"agent.ssi.tchap.gouv.fr",
// "agent.finances.tchap.gouv.fr",
"agent.finances.tchap.gouv.fr",
"agent.social.tchap.gouv.fr",
"agent.interieur.tchap.gouv.fr",
"agent.agriculture.tchap.gouv.fr",
Expand All @@ -292,10 +292,10 @@ final class BuildSettings: NSObject {
"agent.dev-durable.tchap.gouv.fr",
"agent.education.tchap.gouv.fr"
],
// No activation of video calls actually in Tchap Production.
// tchapFeatureVideoOverIP: [
// "agent.dinum.tchap.gouv.fr"
// ],
tchapFeatureVideoOverIP: [
"agent.dinum.tchap.gouv.fr",
"agent.education.tchap.gouv.fr"
],
tchapFeatureGeolocationSharing: [
tchapFeatureAnyHomeServer
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,36 +166,6 @@ final class LocationSharingCoordinator: Coordinator, Presentable {

// Check if user can send beacon info state event
private func canShareLiveLocation() -> Bool {
<<<<<<< HEAD
// Tchap: allow live sharing geolocation based on room power levels
//
// guard let myUserId = parameters.roomDataSource.mxSession.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

guard let myUserId = parameters.roomDataSource.mxSession.myUserId,
let roomPowerLevels = parameters.roomDataSource.roomState.powerLevels,
let userPowerLevel = RoomPowerLevel(rawValue: parameters.roomDataSource.roomState.powerLevels.powerLevelOfUser(withUserID: myUserId)) else {
return false
}

// Tchap: should call `minimumPowerLevelForSendingStateEvent(_ eventType: MXEventType) -> Int` from `MatrixSDK:MXRoomPowerLevels.swift`
// but can't because it is inaccessible due to 'internal' protection level
//
// let liveSharingPowerLevel = parameters.roomDataSource.roomState.powerLevels.minimumPowerLevelForSendingStateEvent(.beaconInfo)
//

// 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
=======
guard let myUserId = parameters.roomDataSource.mxSession.myUserId,
let roomPowerLevels = parameters.roomDataSource.roomState.powerLevels,
let userPowerLevel = RoomPowerLevel(rawValue: roomPowerLevels.powerLevelOfUser(withUserID: myUserId)) else {
Expand All @@ -204,7 +174,6 @@ final class LocationSharingCoordinator: Coordinator, Presentable {

// CHeck user power level in room against power level needed to post geolocation state event.
let liveSharingPowerLevel = roomPowerLevels.minimumPowerLevelForSendingStateEvent(.beaconInfo)
>>>>>>> v1.11.18

return userPowerLevel.rawValue >= liveSharingPowerLevel
}
Expand Down

0 comments on commit 36258ee

Please sign in to comment.