Skip to content

Commit

Permalink
Merge branch 'release/1.11.10/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
pixlwave committed May 1, 2024
2 parents b8fd06c + 4e45dd1 commit e999a8a
Show file tree
Hide file tree
Showing 13 changed files with 699 additions and 53 deletions.
11 changes: 11 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## Changes in 1.11.10 (2024-05-01)

🙌 Improvements

- Upgrade MatrixSDK version ([v0.27.7](https://github.com/matrix-org/matrix-ios-sdk/releases/tag/v0.27.7)).

Others

- Improvements to reporting of decryption failures.


## Changes in 1.11.9 (2024-04-02)

Others
Expand Down
4 changes: 2 additions & 2 deletions Config/AppVersion.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
//

// Version
MARKETING_VERSION = 1.11.9
CURRENT_PROJECT_VERSION = 1.11.9
MARKETING_VERSION = 1.11.10
CURRENT_PROJECT_VERSION = 1.11.10
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use_frameworks!
# - `{ :specHash => {sdk spec hash}` to depend on specific pod options (:git => …, :podspec => …) for MatrixSDK repo. Used by Fastfile during CI
#
# Warning: our internal tooling depends on the name of this variable name, so be sure not to change it
$matrixSDKVersion = '= 0.27.6'
$matrixSDKVersion = '= 0.27.7'
# $matrixSDKVersion = :local
# $matrixSDKVersion = { :branch => 'develop'}
# $matrixSDKVersion = { :specHash => { git: 'https://git.io/fork123', branch: 'fix' } }
Expand Down
16 changes: 8 additions & 8 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ PODS:
- LoggerAPI (1.9.200):
- Logging (~> 1.1)
- Logging (1.4.0)
- MatrixSDK (0.27.6):
- MatrixSDK/Core (= 0.27.6)
- MatrixSDK/Core (0.27.6):
- MatrixSDK (0.27.7):
- MatrixSDK/Core (= 0.27.7)
- MatrixSDK/Core (0.27.7):
- AFNetworking (~> 4.0.0)
- GZIP (~> 1.3.0)
- libbase58 (~> 0.1.4)
- MatrixSDKCrypto (= 0.3.13)
- OLMKit (~> 3.2.5)
- Realm (= 10.27.0)
- SwiftyBeaver (= 1.9.5)
- MatrixSDK/JingleCallStack (0.27.6):
- MatrixSDK/JingleCallStack (0.27.7):
- JitsiMeetSDKLite (= 8.1.2-lite)
- MatrixSDK/Core
- MatrixSDKCrypto (0.3.13)
Expand Down Expand Up @@ -102,8 +102,8 @@ DEPENDENCIES:
- KeychainAccess (~> 4.2.2)
- KTCenterFlowLayout (~> 1.3.1)
- libPhoneNumber-iOS (~> 0.9.13)
- MatrixSDK (= 0.27.6)
- MatrixSDK/JingleCallStack (= 0.27.6)
- MatrixSDK (= 0.27.7)
- MatrixSDK/JingleCallStack (= 0.27.7)
- OLMKit
- PostHog (~> 2.0.0)
- ReadMoreTextView (~> 3.0.1)
Expand Down Expand Up @@ -187,7 +187,7 @@ SPEC CHECKSUMS:
libPhoneNumber-iOS: 0a32a9525cf8744fe02c5206eb30d571e38f7d75
LoggerAPI: ad9c4a6f1e32f518fdb43a1347ac14d765ab5e3d
Logging: beeb016c9c80cf77042d62e83495816847ef108b
MatrixSDK: 4129ab9c0acda1d0aad50b1c9765bd795b8d70b9
MatrixSDK: e07b2309f3c6498c1df987441da7006d099c47a4
MatrixSDKCrypto: bf08b72f2cd015d8749420a2b8b92fc0536bedf4
OLMKit: da115f16582e47626616874e20f7bb92222c7a51
PostHog: 660ec6c9d80cec17b685e148f17f6785a88b597d
Expand All @@ -208,6 +208,6 @@ SPEC CHECKSUMS:
zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c
ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5

PODFILE CHECKSUM: c87b532985dd755b373732f841e3bcfe616f4e4f
PODFILE CHECKSUM: 1197abec9c5affbef652747dd5cd6aaf00ef3a47

COCOAPODS: 1.14.3
19 changes: 10 additions & 9 deletions Riot/Assets/fa.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"contacts_address_book_matrix_users_toggle" = "فقط کاربران ماتریس";
"directory_search_results_more_than" = ">%tu نتیجه برای %@ یافت شد";
"directory_search_results" = "%tu نتیجه برای %@ یافت شد";
"search_in_progress" = "در حال جست وجو";
"search_in_progress" = "جوییدن…";
"search_no_result" = "نتیچه ای یافت نشد";
"search_people_placeholder" = "جستجو بر اساس شناسه کاربری، نام یا آدرس ایمیل";
"search_default_placeholder" = "جست و جو";
Expand Down Expand Up @@ -246,7 +246,7 @@
"room_accessibility_search" = "جستجو";
"room_message_edits_history_title" = "ویرایش های پیام";
"room_resource_usage_limit_reached_message_2" = "برخی از کاربران نمی توانند وارد سیستم شوند.";
"room_resource_limit_exceeded_message_contact_3" = " برای ادامه استفاده از این سرویس";
"room_resource_limit_exceeded_message_contact_3" = " برای ادامه استفاده از این خدمت.";
"room_resource_limit_exceeded_message_contact_2_link" = "با سرپرست سرویس خود تماس بگیرید";
"room_resource_limit_exceeded_message_contact_1" = " لطفا ";
"room_predecessor_link" = "برای دیدن پیام‌های قدیمی‌تر به اینجاضربه بزنید.";
Expand Down Expand Up @@ -416,7 +416,7 @@
"event_formatter_call_retry" = "تلاش مجدد";
"event_formatter_call_answer" = "پاسخ";
"event_formatter_call_decline" = "رد تماس";
"event_formatter_call_back" = "تماس";
"event_formatter_call_back" = "پاسخ تماس";
"event_formatter_call_connection_failed" = "ارتباط ناموفق بود";
"event_formatter_call_missed_video" = "تماس ویدیویی از دست رفته";
"event_formatter_call_missed_voice" = "تماس صوتی از دست رفته";
Expand Down Expand Up @@ -464,7 +464,7 @@
"group_participants_invited_section" = "دعوت شده";
"group_participants_invite_malformed_id_title" = "خطای دعوت";
"group_participants_invite_another_user" = "جستجو / دعوت با شناسه کاربری یا نام";
"group_participants_filter_members" = "اعضای انجمن را فیلتر کنید";
"group_participants_filter_members" = "پالایش اعضای اجتماع";
"group_participants_invite_prompt_msg" = "آیا مطمئنید که می خواهید %@ را به این گروه دعوت کنید؟";
"group_participants_invite_prompt_title" = "تایید";
"group_participants_remove_prompt_msg" = "آیا مطمئنید که می خواهید %@ را از این گروه حذف کنید؟";
Expand Down Expand Up @@ -570,7 +570,7 @@
"room_details_files" = "بارگذاری شده ها";
"room_details_people" = "اعضا";
"room_details_title_for_dm" = "جزییات";
"identity_server_settings_alert_disconnect_still_sharing_3pid_button" = "به هر حال قطع کن";
"identity_server_settings_alert_disconnect_still_sharing_3pid_button" = "قطع شدن به هر روی";
"identity_server_settings_alert_disconnect_button" = "قطع کردن";
"identity_server_settings_disconnect" = "قطع کردن";
"identity_server_settings_change" = "تغییر دادن";
Expand Down Expand Up @@ -652,7 +652,7 @@
"settings_confirm_password" = "تایید رمز";
"settings_new_password" = "رمز جدید";
"settings_old_password" = "رمز قدیمی";
"settings_third_party_notices" = "اعلامیه های شخص ثالث";
"settings_third_party_notices" = "یادآوری‌های سوم‌شخص";
"settings_privacy_policy" = "سیاست حفظ حریم خصوصی";
"settings_term_conditions" = "شرایط و ضوابط";
"settings_copyright" = "کپی رایت";
Expand Down Expand Up @@ -684,7 +684,7 @@
"settings_room_upgrades" = "ارتقاء اتاق";
"settings_messages_by_a_bot" = "پیام های ربات";
"settings_call_invitations" = "دعوت نامه های تماس";
"settings_room_invitations" = "دعوت نامه های اتاق";
"settings_room_invitations" = "دعوتهای اتاق";
"settings_messages_containing_keywords" = "کلمات کلیدی";
"settings_messages_containing_at_room" = "@ اتاق";
"settings_messages_containing_user_name" = "نام کاربری من";
Expand All @@ -694,13 +694,13 @@
"settings_encrypted_direct_messages" = "پیام های مستقیم رمزگذاری شده";
"settings_direct_messages" = "پیام مستقیم";
"settings_notify_me_for" = "به من اطلاع بده برای";
"settings_mentions_and_keywords" = "ذکر و کلمات کلیدی";
"settings_mentions_and_keywords" = "نام‌بری و کلیدواژگان";
"settings_default" = "اعلان های پیش فرض";
"settings_notifications_disabled_alert_message" = "برای فعال کردن اعلان‌ها، به تنظیمات دستگاه خود بروید.";
"settings_notifications_disabled_alert_title" = "غیر فعال کردن اعلان ها";
"settings_pin_rooms_with_missed_notif" = "پین کردن اتاق هایی با اعلان های از دست رفته";
"settings_pin_rooms_with_unread" = "پین کردن اتاق هایی با پیام های خوانده نشده";
"settings_global_settings_info" = "تنظیمات اعلان جهانی در سرویس گیرنده وب %@ شما موجود است";
"settings_global_settings_info" = "تنظیمات آگاهی عمومی در کارخواه وب %@تان موجود است";
"settings_show_decrypted_content" = "نمایش محتوای رمزگشایی شده";
"settings_device_notifications" = "اعلان های دستگاه";
"settings_enable_push_notif" = "اعلان ها در این دستگاه";
Expand Down Expand Up @@ -1346,3 +1346,4 @@
"onboarding_splash_page_2_title" = "تحت کنترل شماست.";
"onboarding_splash_page_1_message" = "یک ارتباط امن و مستقل که سطح حریم شخصی آن دقیقا مشابه ارتباط رو در رو در منزل شماست.";
"accessibility_selected" = "انتخاب شده";
"room_title_members" = "%@ عضو";
15 changes: 15 additions & 0 deletions Riot/Assets/hu.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -2740,3 +2740,18 @@

"key_verification_self_verify_security_upgrade_alert_title" = "Alkalmazás frissítve";
"settings_acceptable_use" = "Elfogadható felhasználói feltételek";
"room_creation_user_not_found_prompt_title" = "Megerősítés";
"room_creation_user_not_found_prompt_message" = "Nem található profil ehhez a Matrix-azonosítóhoz. Mindenképp elindítja a privát csevegést?";
"room_creation_user_not_found_prompt_invite_action" = "Privát csevegés mindenképp";
"room_participants_invite_unknown_participant_prompt_to_msg" = "Nem található profil ehhez a Matrix-azonosítóhoz. Mindenképp meghívja %@ felhasználót a(z) %@ szobába?";
"room_participants_invite_anyway" = "Meghívás mindenképp";

// Room commands descriptions
"room_command_change_display_name_description" = "Megváltoztatja a megjelenítendő becenevét";
"room_command_emote_description" = "Megjeleníti a műveletet";
"room_command_join_room_description" = "Csatlakozik a megadott című szobához";
"room_command_part_room_description" = "Elhagyja a szobát";
"room_command_invite_user_description" = "Meghívja az adott azonosítójú felhasználót a jelenlegi szobába";
"room_command_kick_user_description" = "Eltávolítja az adott azonosítójú felhasználót ebből a szobából";
"room_command_ban_user_description" = "Kitiltja az adott azonosítójú felhasználót";
"room_command_unban_user_description" = "Feloldja az adott azonosítójú felhasználó kitiltását";
76 changes: 76 additions & 0 deletions Riot/Assets/ka.lproj/Vector.strings
Original file line number Diff line number Diff line change
@@ -1 +1,77 @@


// String for App Store
"store_short_description" = "უსაფრთხო დეცენტრალიზებული ჩატი/ვოიპი";

// Titles
"title_home" = "მთავარი";
"title_favourites" = "ფავორიტები";
"title_people" = "ხალხი";
"title_rooms" = "ოთახები";
"title_groups" = "თემები";
"warning" = "გაფრთხილება";

// Actions
"view" = "ხედი";
"next" = "შემდეგი";
"back" = "უკან";
"continue" = "გაგრძელება";
"create" = "შექმნა";
"start" = "აწყება";
"leave" = "დატოვება";
"remove" = "წაშლა";
"retry" = "გამეორება";
"on" = "ჩართული";
"off" = "გამორთული";
"enable" = "ჩართვა";
"save" = "შენახვა";
"join" = "შეუერთდება";
"decline" = "უარყოფა";
"accept" = "მიღება";
"camera" = "კამერა";
"voice" = "ხმა";
"video" = "ვიდეო";
"active_call" = "აქტიური ზარი";
"later" = "შემდეგ";
"rename" = "გადარქმევა";
"collapse" = "ჩაკეცვა";
"send_to" = "გაგზავნა %@-ს";
"close" = "დახურვა";
"skip" = "გამოტოვება";
"joined" = "შეუერთდა";
"switch" = "გადართვა";
"more" = "მეტი";
"less" = "ნაკლები";
"open" = "გახსნა";
"private" = "ირადი";
"public" = "საჯარო";
"stop" = "შეჩერება";
"new_word" = "ახალი";
"existing" = "არსებული";
"add" = "დამატება";
"ok" = "კარგი";
"error" = "შეცდომა";
"suggest" = "შესთავაზება";
"confirm" = "დადასტურება";
"invite_to" = "მიწვევა %@-ში";

// Activities
"loading" = "ჩატვირთვა";
"sending" = "გაგზავნა";
"callbar_active_and_single_paused" = "1 აქტიური ზარი (%@) · 1 შეჩერებული ზარი";
"callbar_active_and_multiple_paused" = "1 აქტიური ზარი (%@) · %@ შეჩერებული ზარები";
"callbar_only_single_paused" = "შეჩერებული ზარი";
"callbar_return" = "დაბრუნება";
"store_promotional_text" = "კონფიდენციალობის დაცვით ჩატისა და თანამშრომლობის აპლიკაცია, ღია ქსელზე. დეცენტრალიზებული, რათა მართვა გადაგიცემათ. არაა დათამაინინგი, არაა უკანა კარები და არაა მესამე მხარის წვდომა.";
"invite" = "მიწვევა";
"cancel" = "გაუქმება";
"preview" = "წინასწარი ხილვა";
"active_call_details" = "აქტიური ზარი (%@)";
"joining" = "შეერთება";
"done" = "დასრულებული";
"edit" = "რედაქტირება";
"saving" = "შენახვა";

// Call Bar
"callbar_only_single_active" = "შეეხეთ, რომ დაბრუნდეთ ზარში (%@)";
"callbar_only_multiple_paused" = "%@ შეჩერებული ზარები";
28 changes: 19 additions & 9 deletions Riot/Modules/Analytics/DecryptionFailure+Analytics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,34 @@ extension DecryptionFailure {

public func toAnalyticsEvent() -> AnalyticsEvent.Error {

let timeToDecryptMillis: Int = if self.timeToDecrypt != nil {
Int(self.timeToDecrypt! * 1000)
let timeToDecryptMillis: Int = if let ttd = self.timeToDecrypt {
Int(ttd * 1000)
} else {
-1
}

let isHistoricalEvent = if let localAge = self.eventLocalAgeMillis {
localAge < 0
} else { false }

let errorName = if isHistoricalEvent && self.trustOwnIdentityAtTimeOfFailure == false {
AnalyticsEvent.Error.Name.HistoricalMessage
} else {
self.reason.errorName
}

return AnalyticsEvent.Error(
context: self.context,
cryptoModule: .Rust,
cryptoSDK: .Rust,
domain: .E2EE,

eventLocalAgeMillis: nil,
isFederated: nil,
isMatrixDotOrg: nil,
name: self.reason.errorName,
eventLocalAgeMillis: self.eventLocalAgeMillis,
isFederated: self.isFederated,
isMatrixDotOrg: self.isMatrixOrg,
name: errorName,
timeToDecryptMillis: timeToDecryptMillis,
userTrustsOwnIdentity: nil,
wasVisibleToUser: nil
userTrustsOwnIdentity: self.trustOwnIdentityAtTimeOfFailure,
wasVisibleToUser: self.wasVisibleToUser
)
}
}
13 changes: 13 additions & 0 deletions Riot/Modules/Analytics/DecryptionFailure.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,19 @@ import AnalyticsEvents
/// UTDs can be permanent or temporary. If temporary, this field will contain the time it took to decrypt the message in milliseconds. If permanent should be nil
var timeToDecrypt: TimeInterval?

/// Was the current cross-signing identity trusted at the time of decryption
var trustOwnIdentityAtTimeOfFailure: Bool?

var eventLocalAgeMillis: Int?

/// Is the current user on matrix org
var isMatrixOrg: Bool?
/// Are the sender and recipient on the same homeserver
var isFederated: Bool?

/// As for now the ios App only reports UTDs visible to user (error are reported from EventFormatter
var wasVisibleToUser: Bool = true

init(failedEventId: String, reason: DecryptionFailureReason, context: String, ts: TimeInterval) {
self.failedEventId = failedEventId
self.reason = reason
Expand Down
29 changes: 26 additions & 3 deletions Riot/Modules/Analytics/DecryptionFailureTracker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ class DecryptionFailureTracker: NSObject {
selector: #selector(eventDidDecrypt(_:)),
name: .mxEventDidDecrypt,
object: nil)

}

@objc
func reportUnableToDecryptError(forEvent event: MXEvent, withRoomState roomState: MXRoomState, myUser userId: String) {
func reportUnableToDecryptError(forEvent event: MXEvent, withRoomState roomState: MXRoomState, mySession: MXSession) {
if reportedFailures[event.eventId] != nil || trackedEvents.contains(event.eventId) {
return
}
guard let userId = mySession.myUserId else { return }

// Filter out "expected" UTDs
// We cannot decrypt messages sent before the user joined the room
Expand All @@ -82,6 +82,12 @@ class DecryptionFailureTracker: NSObject {

guard let error = event.decryptionError as? NSError else { return }

let eventOrigin = event.originServerTs
let deviceTimestamp = mySession.crypto.deviceCreationTs
// If negative it's an historical event relative to the current session
let eventRelativeAgeMillis = Int(eventOrigin) - Int(deviceTimestamp)
let isSessionVerified = mySession.crypto.crossSigning.canTrustCrossSigning

var reason = DecryptionFailureReason.unspecified

if error.code == MXDecryptingErrorUnknownInboundSessionIdCode.rawValue {
Expand All @@ -92,7 +98,24 @@ class DecryptionFailureTracker: NSObject {

let context = String(format: "code: %ld, description: %@", error.code, event.decryptionError.localizedDescription)

reportedFailures[failedEventId] = DecryptionFailure(failedEventId: failedEventId, reason: reason, context: context, ts: self.timeProvider.nowTs())
let failure = DecryptionFailure(failedEventId: failedEventId, reason: reason, context: context, ts: self.timeProvider.nowTs())

failure.eventLocalAgeMillis = Int(exactly: eventRelativeAgeMillis)
failure.trustOwnIdentityAtTimeOfFailure = isSessionVerified

let myDomain = userId.components(separatedBy: ":").last
failure.isMatrixOrg = myDomain == "matrix.org"

if MXTools.isMatrixUserIdentifier(event.sender) {
let senderDomain = event.sender.components(separatedBy: ":").last
failure.isFederated = senderDomain != nil && senderDomain != myDomain
}

/// XXX for future work, as for now only the event formatter reports UTDs. That means that it's only UTD ~visible to users
failure.wasVisibleToUser = true

reportedFailures[failedEventId] = failure


// Start the ticker if needed. There is no need to have a ticker if no failures are tracked
if checkFailuresTimer == nil {
Expand Down
2 changes: 1 addition & 1 deletion Riot/Utils/EventFormatter.m
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ - (NSAttributedString *)unsafeAttributedStringFromEvent:(MXEvent *)event
{
// Track e2e failures
dispatch_async(dispatch_get_main_queue(), ^{
[[DecryptionFailureTracker sharedInstance] reportUnableToDecryptErrorForEvent:event withRoomState:roomState myUser:self->mxSession.myUser.userId];
[[DecryptionFailureTracker sharedInstance] reportUnableToDecryptErrorForEvent:event withRoomState:roomState mySession:self->mxSession];
});

if (event.decryptionError.code == MXDecryptingErrorUnknownInboundSessionIdCode)
Expand Down
Loading

0 comments on commit e999a8a

Please sign in to comment.