Skip to content

Commit

Permalink
Merge branch 'release/tchap_v1.99.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
yostyle committed May 10, 2022
2 parents cbb2b44 + 3fb7812 commit dcd9c7f
Show file tree
Hide file tree
Showing 1,092 changed files with 64,650 additions and 22,180 deletions.
136 changes: 101 additions & 35 deletions Btchap/Config/BuildSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,12 @@ final class BuildSettings: NSObject {
// Tchap-Web instance for the app
static let applicationWebAppUrlString = "https://www.beta.tchap.gouv.fr"

/// Whether to allow the app to use a right to left layout or force left to right for all languages
static let disableRightToLeftLayout = true

// MARK: - Server configuration

// TODO: replace m.org with https://sygnal.tchap.gouv.fr
static let serverConfigSygnalAPIUrlString = "https://matrix.org/_matrix/push/v1/notify"
// Tchap sygnal server url
static let serverConfigSygnalAPIUrlString = "https://sygnal.tchap.gouv.fr/_matrix/push/v1/notify"


// MARK: - Legal URLs
Expand All @@ -124,11 +125,12 @@ final class BuildSettings: NSObject {
"www.beta.tchap.gouv.fr"
]
static let permalinkPrefix = "https://www.beta.tchap.gouv.fr"
static let clientPermalinkBaseUrl: String? = nil


// MARK: - VoIP
static var allowVoIPUsage: Bool {
#if canImport(JitsiMeet)
#if canImport(JitsiMeetSDK)
return true
#else
return false
Expand All @@ -147,12 +149,38 @@ final class BuildSettings: NSObject {
static let roomsAllowToJoinPublicRooms: Bool = true

// MARK: - Analytics
static let analyticsServerUrl: URL? = URL(string: "")
static let analyticsAppId: String? = nil
static let analyticsHost: String? = nil
static let analyticsKey: String? = nil

/// A type that represents how to set up the analytics module in the app.
///
/// **Note:** Analytics are disabled by default for forks.
/// If you are maintaining a fork, set custom configurations.
struct AnalyticsConfiguration {
/// Whether or not analytics should be enabled.
let isEnabled: Bool
/// The host to use for PostHog analytics.
let host: String
/// The public key for submitting analytics.
let apiKey: String
/// The URL to open with more information about analytics terms.
let termsURL: URL
}

#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: "")!)
#else
/// The configuration to use for analytics. Set `isEnabled` to false to disable analytics.
static let analyticsConfiguration = AnalyticsConfiguration(isEnabled: false,
host: "",
apiKey: "",
termsURL: URL(string: "")!)
#endif

// MARK: - Bug report
static let bugReportEndpointUrlString = ""
static let bugReportDefaultHost = "i.tchap.gouv.fr"
static let bugReportEndpointUrlSuffix = "/bugreports"
// Use the name allocated by the bug report server
Expand All @@ -170,9 +198,11 @@ final class BuildSettings: NSObject {
"https://scalar-staging.vector.im/api",
"https://scalar-staging.riot.im/scalar/api"
]
// Jitsi server used outside integrations to create conference calls from the call button in the timeline
static let jitsiServerUrl: URL = URL(string: "https://jitsi.riot.im")!

// Jitsi server used outside integrations to create conference calls from the call button in the timeline.
// Setting this to nil effectively disables Jitsi conference calls (given that there is no wellknown override).
// Note: this will not remove the conference call button, use roomScreenAllowVoIPForNonDirectRoom setting.
static let jitsiServerUrl: URL? = URL(string: "https://jitsi.riot.im")


// MARK: - Features

Expand All @@ -191,7 +221,9 @@ final class BuildSettings: NSObject {

static let allowInviteExernalUsers: Bool = true

// MARK: - Side Menu
static let enableSideMenu: Bool = true
static let sideMenuShowInviteFriends: Bool = true

/// Whether to read the `io.element.functional_members` state event and exclude any service members when computing a room's name and avatar.
static let supportFunctionalMembers: Bool = true
Expand Down Expand Up @@ -231,27 +263,33 @@ final class BuildSettings: NSObject {
static let settingsScreenShowThreepidExplanatory: Bool = true
static let settingsScreenShowDiscoverySettings: Bool = true
static let settingsScreenAllowIdentityServerConfig: Bool = true
static let settingsScreenShowConfirmMediaSize: Bool = true
static let settingsScreenShowAdvancedSettings: Bool = true
static let settingsScreenShowLabSettings: Bool = true
static let settingsScreenAllowChangingRageshakeSettings: Bool = true
static let settingsScreenAllowChangingCrashUsageDataSettings: Bool = true
static let settingsScreenAllowBugReportingManually: Bool = true
static let settingsScreenAllowDeactivatingAccount: Bool = true
static let settingsScreenShowChangePassword:Bool = true
static let settingsScreenShowInviteFriends:Bool = true
static let settingsScreenShowChangePassword: Bool = true
static let settingsScreenShowEnableStunServerFallback: Bool = true
static let settingsScreenShowNotificationDecodedContentOption: Bool = true
static let settingsScreenShowNsfwRoomsOption: Bool = true
static let settingsSecurityScreenShowSessions:Bool = true
static let settingsSecurityScreenShowSetupBackup:Bool = true
static let settingsSecurityScreenShowRestoreBackup:Bool = true
static let settingsSecurityScreenShowDeleteBackup:Bool = true
static let settingsSecurityScreenShowCryptographyInfo:Bool = true
static let settingsSecurityScreenShowCryptographyExport:Bool = true
static let settingsSecurityScreenShowAdvancedUnverifiedDevices:Bool = true
static let settingsSecurityScreenShowSessions: Bool = true
static let settingsSecurityScreenShowSetupBackup: Bool = true
static let settingsSecurityScreenShowRestoreBackup: Bool = true
static let settingsSecurityScreenShowDeleteBackup: Bool = true
static let settingsSecurityScreenShowCryptographyInfo: Bool = true
static let settingsSecurityScreenShowCryptographyExport: Bool = true
static let settingsSecurityScreenShowAdvancedUnverifiedDevices: Bool = true
/// A setting to enable the presence configuration settings section.
static let settingsScreenPresenceAllowConfiguration: Bool = false

// MARK: - Timeline settings
static let roomInputToolbarCompressionMode = MXKRoomInputToolbarCompressionModePrompt
static let roomInputToolbarCompressionMode: MediaCompressionMode = .prompt

enum MediaCompressionMode {
case prompt, small, medium, large, none
}

// MARK: - Room Creation Screen

Expand All @@ -275,6 +313,10 @@ final class BuildSettings: NSObject {
static var isRoomScreenEnableMessageBubblesByDefault: Bool {
return self.roomScreenTimelineDefaultStyleIdentifier == .bubble
}
static let roomScreenUseOnlyLatestUserAvatarAndName: Bool = false

/// Allow split view detail view stacking
static let allowSplitViewDetailsScreenStacking: Bool = true

// MARK: - Room Contextual Menu

Expand All @@ -284,19 +326,19 @@ final class BuildSettings: NSObject {

// MARK: - Room Info Screen

static let roomInfoScreenShowIntegrations: Bool = true
static let roomInfoScreenShowIntegrations: Bool = false

// MARK: - Room Settings Screen

static let roomSettingsScreenShowLowPriorityOption: Bool = true
static let roomSettingsScreenShowDirectChatOption: Bool = true
static let roomSettingsScreenAllowChangingAccessSettings: Bool = true
static let roomSettingsScreenAllowChangingHistorySettings: Bool = true
static let roomSettingsScreenShowAddressSettings: Bool = true
static let roomSettingsScreenShowFlairSettings: Bool = true
static let roomSettingsScreenShowAdvancedSettings: Bool = true
static let roomSettingsScreenAdvancedShowEncryptToVerifiedOption: Bool = true
static let roomSettingsScreenShowNotificationsV2: Bool = true
static let roomSettingsScreenShowLowPriorityOption: Bool = false
static let roomSettingsScreenShowDirectChatOption: Bool = false
static let roomSettingsScreenAllowChangingAccessSettings: Bool = false
static let roomSettingsScreenAllowChangingHistorySettings: Bool = false
static let roomSettingsScreenShowAddressSettings: Bool = false
static let roomSettingsScreenShowFlairSettings: Bool = false
static let roomSettingsScreenShowAdvancedSettings: Bool = false
static let roomSettingsScreenAdvancedShowEncryptToVerifiedOption: Bool = false
static let roomSettingsScreenShowNotificationsV2: Bool = false

// MARK: - Room Member Screen

Expand All @@ -321,23 +363,34 @@ final class BuildSettings: NSObject {

// MARK: - Authentication Screen
static let authScreenShowRegister = true
static let authScreenShowPhoneNumber = true
static let authScreenShowPhoneNumber = false
static let authScreenShowForgotPassword = true
static let authScreenShowCustomServerOptions = true
static let authScreenShowCustomServerOptions = false
static let authScreenShowSocialLoginSection = false

// MARK: - Authentication Options
static let authEnableRefreshTokens = false

// MARK: - Onboarding
static let onboardingShowAccountPersonalization = false

// MARK: - Unified Search
static let unifiedSearchScreenShowPublicDirectory = true

// MARK: - Secrets Recovery
static let secretsRecoveryAllowReset = true

// MARK: - UISI Autoreporting
static let cryptoUISIAutoReportingEnabled = false

// MARK: - Polls

static var pollsEnabled: Bool {
guard #available(iOS 14, *) else {
return false
}

return false//true : Not available on Tchap
return false//true : Currently disabled in Tchap.
}

// MARK: - Location Sharing
Expand All @@ -349,6 +402,19 @@ final class BuildSettings: NSObject {
return false
}

return false//true : Not available on Tchap
return false//true : Currently disabled in Tchap.
}

static var liveLocationSharingEnabled: Bool {
guard #available(iOS 14, *) else {
return false
}

guard self.locationSharingEnabled else {
return false
}

// Do not enable live location sharing atm
return false
}
}
29 changes: 21 additions & 8 deletions Btchap/target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ targets:

settings:
base:
GCC_PREPROCESSOR_DEFINITIONS: $(inherited) ENABLE_REACTIONS=1 ENABLE_EDITION=1 ENABLE_JOIN_BY_LINK=1
OTHER_SWIFT_FLAGS: $(inherited) -D ENABLE_REACTIONS -D ENABLE_EDITION
GCC_PREPROCESSOR_DEFINITIONS: $(inherited) ENABLE_JOIN_BY_LINK=1

sources:
- path: ../Btchap/Config
Expand Down Expand Up @@ -96,6 +95,11 @@ targets:
- "Managers/UniversalLink"
- "**/*.strings" # Exclude all strings files
- "**/*.cer"
- "Modules/Home/HomeCoordinator.swift"
- "Modules/Home/HomeCoordinatorType.swift"
- "Modules/Room/RoomDetailsCoordinator.swift"
- "Modules/Room/RoomDetailsCoordinatorType.swift"
- "Modules/Room/DiscussionDetailsCoordinator.swift"
- path: ../Tchap/Modules/Application/VersionUpdate
- path: ../Tchap/Generated/Images_Riot.swift
- path: ../Tchap/Modules/Room/Views/BubbleCells/Antivirus
Expand All @@ -115,7 +119,6 @@ targets:
- path: ../Riot/Assets/Sounds
- path: ../Riot/Assets/third_party_licenses.html
- path: ../Riot/Categories
- path: ../Riot/Generated/MatrixKitStrings.swift
- path: ../Riot/Generated/Vector_Strings.swift
- path: ../Riot/Managers/AppInfo
- path: ../Riot/Managers/BugReport
Expand Down Expand Up @@ -160,6 +163,7 @@ targets:
- path: ../Riot/Modules/Common/Avatar
- path: ../Riot/Modules/Common/Buttons
- path: ../Riot/Modules/Common/Cells
- path: ../Riot/Modules/Common/CoachMessages
- path: ../Riot/Modules/Common/CollectionView
- path: ../Riot/Modules/Common/Models
- path: ../Riot/Modules/Common/NavigationController/RiotNavigationController.h
Expand All @@ -172,13 +176,17 @@ targets:
- path: ../Riot/Modules/Common/Recents/Model
- path: ../Riot/Modules/Common/Recents/Service
- path: ../Riot/Modules/Common/Recents/Views
- path: ../Riot/Modules/Common/Recents/RecentsViewController+RoomInvite.swift
- path: ../Riot/Modules/Common/SectionHeaders
- path: ../Riot/Modules/Common/SegmentedViewController/SegmentedViewController.h
- path: ../Riot/Modules/Common/SegmentedViewController/SegmentedViewController.m
- path: ../Riot/Modules/Common/SwiftUI
- path: ../Riot/Modules/Common/Toasts
- path: ../Riot/Modules/Common/UserIndicators
- path: ../Riot/Modules/Common/Views
- path: ../Riot/Modules/Common/WebViewController
- path: ../Riot/Modules/Contacts/Details/Views
- path: ../Riot/Modules/Contacts
- path: ../Riot/Modules/CreateRoom
- path: ../Riot/Modules/CrossSigning
- path: ../Riot/Modules/DeepLink
- path: ../Riot/Modules/DotsView
Expand All @@ -191,12 +199,15 @@ targets:
- path: ../Riot/Modules/GlobalSearch/Files/CellData/FilesSearchCellData.m
- path: ../Riot/Modules/GlobalSearch/Files/Views/FilesSearchTableViewCell.h
- path: ../Riot/Modules/GlobalSearch/Files/Views/FilesSearchTableViewCell.m
- path: ../Riot/Modules/GlobalSearch/Views
- path: ../Riot/Modules/Integrations
- path: ../Riot/Modules/KeyBackup
- path: ../Riot/Modules/KeyVerification
- path: ../Riot/Modules/LaunchLoading
- path: ../Riot/Modules/MatrixKit
- path: ../Riot/Modules/MediaPicker
- path: ../Riot/Modules/MediaPickerV2
- path: ../Riot/Modules/People
- path: ../Riot/Modules/PublicRoomList
- path: ../Riot/Modules/QRCode
- path: ../Riot/Modules/Reauthentication
Expand Down Expand Up @@ -234,10 +245,12 @@ targets:
- path: ../Riot/Utils

# Riot SwiftUI
- path: ../RiotSwiftUI/Modules/Common/Avatar/Model/AvatarProtocol.swift
- path: ../RiotSwiftUI/Modules/Common/Logging
- path: ../RiotSwiftUI/Modules/Common/Theme
- path: ../RiotSwiftUI/Modules/Room/NotificationSettings/Model
- path: ../RiotSwiftUI/Modules
# Riot will provide it's own LocaleProviderType so exclude.
excludes:
- "Common/Locale/LocaleProvider.swift"
- "**/Test/**"
- "Room/LocationSharing"

# Share extension
- path: ../RiotShareExtension/Shared
Expand Down
Loading

0 comments on commit dcd9c7f

Please sign in to comment.