From 8639971d9fdd80884c219fe5916112f2b7439e45 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Wed, 7 Feb 2024 12:33:22 +0200 Subject: [PATCH 1/4] Prepare for new sprint From 3a89ecf04b90ecc0f2c9cd7d4d1787cdcf979c9f Mon Sep 17 00:00:00 2001 From: Valere Date: Tue, 2 Apr 2024 15:23:11 +0200 Subject: [PATCH 2/4] Add own device creation ts in crypto API --- MatrixSDK/Crypto/MXCrypto.h | 6 ++++++ MatrixSDK/Crypto/MXCrypto.m | 6 ++++++ MatrixSDK/Crypto/MXCryptoV2.swift | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/MatrixSDK/Crypto/MXCrypto.h b/MatrixSDK/Crypto/MXCrypto.h index 3f12cdd45..0d26df375 100644 --- a/MatrixSDK/Crypto/MXCrypto.h +++ b/MatrixSDK/Crypto/MXCrypto.h @@ -95,6 +95,12 @@ extern NSString *const MXDeviceListDidUpdateUsersDevicesNotification; */ @property (nullable, nonatomic, readonly) NSString *deviceEd25519Key; + +/** +* The user device creation in local timestamp, milliseconds since epoch. +*/ +@property (nonatomic) UInt64 deviceCreationTs; + /** The key backup manager. */ diff --git a/MatrixSDK/Crypto/MXCrypto.m b/MatrixSDK/Crypto/MXCrypto.m index fc599496f..c75c39b8d 100644 --- a/MatrixSDK/Crypto/MXCrypto.m +++ b/MatrixSDK/Crypto/MXCrypto.m @@ -1422,6 +1422,12 @@ - (NSString *)olmVersion #endif } +- (uint64_t)deviceCreationTs +{ + // Device creation timestamp is not support in legacy crypto + return 0; +} + #pragma mark - Gossipping diff --git a/MatrixSDK/Crypto/MXCryptoV2.swift b/MatrixSDK/Crypto/MXCryptoV2.swift index 2e5c642b7..adea4ac92 100644 --- a/MatrixSDK/Crypto/MXCryptoV2.swift +++ b/MatrixSDK/Crypto/MXCryptoV2.swift @@ -56,6 +56,11 @@ class MXCryptoV2: NSObject, MXCrypto { return machine.deviceEd25519Key } + var deviceCreationTs: UInt64 { + // own device always exists + return machine.device(userId: machine.userId, deviceId: machine.deviceId)!.firstTimeSeenTs + } + let backup: MXKeyBackup? let keyVerificationManager: MXKeyVerificationManager let crossSigning: MXCrossSigning From e74124ec0c1f368a57826ac67603a9f7b3fdcaca Mon Sep 17 00:00:00 2001 From: Valere Date: Tue, 2 Apr 2024 18:12:29 +0200 Subject: [PATCH 3/4] deviceCreationTs should be readonly --- MatrixSDK/Crypto/MXCrypto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MatrixSDK/Crypto/MXCrypto.h b/MatrixSDK/Crypto/MXCrypto.h index 0d26df375..348edddd0 100644 --- a/MatrixSDK/Crypto/MXCrypto.h +++ b/MatrixSDK/Crypto/MXCrypto.h @@ -99,7 +99,7 @@ extern NSString *const MXDeviceListDidUpdateUsersDevicesNotification; /** * The user device creation in local timestamp, milliseconds since epoch. */ -@property (nonatomic) UInt64 deviceCreationTs; +@property (nonatomic, readonly) UInt64 deviceCreationTs; /** The key backup manager. From e3bba832da3ec8a647fd558563308ac14bd0ccda Mon Sep 17 00:00:00 2001 From: Doug Date: Wed, 1 May 2024 08:56:13 +0100 Subject: [PATCH 4/4] version++ --- CHANGES.md | 5 +++++ MatrixSDK.podspec | 2 +- MatrixSDK/MatrixSDKVersion.m | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 404ac4b97..ad8f78f28 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +## Changes in 0.27.7 (2024-05-01) + +No significant changes. + + ## Changes in 0.27.6 (2024-02-07) No significant changes. diff --git a/MatrixSDK.podspec b/MatrixSDK.podspec index 84c8b1b3d..fadc44551 100644 --- a/MatrixSDK.podspec +++ b/MatrixSDK.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "MatrixSDK" - s.version = "0.27.6" + s.version = "0.27.7" s.summary = "The iOS SDK to build apps compatible with Matrix (https://www.matrix.org)" s.description = <<-DESC diff --git a/MatrixSDK/MatrixSDKVersion.m b/MatrixSDK/MatrixSDKVersion.m index 3f16e20dc..5a4d405a6 100644 --- a/MatrixSDK/MatrixSDKVersion.m +++ b/MatrixSDK/MatrixSDKVersion.m @@ -16,4 +16,4 @@ #import -NSString *const MatrixSDKVersion = @"0.27.6"; +NSString *const MatrixSDKVersion = @"0.27.7";