Skip to content

Commit 548ca88

Browse files
refactor!: remove DecryptedMessage.has_epoch_changed
1 parent 8b64afb commit 548ca88

File tree

6 files changed

+0
-45
lines changed

6 files changed

+0
-45
lines changed

crypto-ffi/bindings/shared/src/commonTest/kotlin/com/wire/crypto/MLSTest.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ class MLSTest : HasMockDeliveryService() {
188188
assertThat(decrypted.message).isNull()
189189
assertThat(decrypted.commitDelay).isNull()
190190
assertThat(decrypted.senderClientId).isNull()
191-
assertThat(decrypted.hasEpochChanged).isTrue()
192191
}
193192

194193
@Test

crypto-ffi/bindings/swift/WireCoreCrypto/WireCoreCryptoTests/WireCoreCryptoTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,6 @@ final class WireCoreCryptoTests: XCTestCase {
552552
XCTAssertNil(decrypted.message)
553553
XCTAssertNil(decrypted.commitDelay)
554554
XCTAssertNil(decrypted.senderClientId)
555-
XCTAssertTrue(decrypted.hasEpochChanged)
556555
}
557556

558557
// swiftlint:disable:next function_body_length

crypto-ffi/src/decrypted_message.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ pub struct DecryptedMessage {
2222
pub commit_delay: Option<u64>,
2323
/// [ClientId] of the sender of the message being decrypted. Only present for application messages.
2424
pub sender_client_id: Option<Arc<ClientId>>,
25-
/// true when the decrypted message resulted in an epoch change i.e. it was a commit
26-
///
27-
/// Deprecated: this member will be removed in the future. Prefer using the `EpochObserver` interface.
28-
#[deprecated = "This member will be removed in the future. Prefer using the `EpochObserver` interface."]
29-
pub has_epoch_changed: bool,
3025
/// Identity claims present in the sender credential
3126
pub identity: WireIdentity,
3227
/// Only set when the decrypted message is a commit.
@@ -48,7 +43,6 @@ impl From<MlsConversationDecryptMessage> for DecryptedMessage {
4843
is_active: from.is_active,
4944
commit_delay: from.delay,
5045
sender_client_id: from.sender_client_id.map(Into::into).map(Arc::new),
51-
has_epoch_changed: from.has_epoch_changed,
5246
identity: from.identity.into(),
5347
buffered_messages,
5448
}
@@ -70,11 +64,6 @@ pub struct BufferedDecryptedMessage {
7064
pub commit_delay: Option<u64>,
7165
/// [ClientId] of the sender of the message being decrypted. Only present for application messages.
7266
pub sender_client_id: Option<Arc<ClientId>>,
73-
/// true when the decrypted message resulted in an epoch change i.e. it was a commit
74-
///
75-
/// Deprecated: this member will be removed in the future. Prefer using the `EpochObserver` interface.
76-
#[deprecated = "This member will be removed in the future. Prefer using the `EpochObserver` interface."]
77-
pub has_epoch_changed: bool,
7867
/// Identity claims present in the sender credential
7968
pub identity: WireIdentity,
8069
}
@@ -87,7 +76,6 @@ impl From<MlsBufferedConversationDecryptMessage> for BufferedDecryptedMessage {
8776
is_active: from.is_active,
8877
commit_delay: from.delay,
8978
sender_client_id: from.sender_client_id.map(Into::into).map(Arc::new),
90-
has_epoch_changed: from.has_epoch_changed,
9179
identity: from.identity.into(),
9280
}
9381
}

crypto/src/mls/conversation/conversation_guard/decrypt/mod.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ pub struct MlsConversationDecryptMessage {
6060
pub delay: Option<u64>,
6161
/// [ClientId] of the sender of the message being decrypted. Only present for application messages.
6262
pub sender_client_id: Option<ClientId>,
63-
/// Is the epoch changed after decrypting this message
64-
#[deprecated = "This member will be removed in the future. Prefer using the `EpochObserver` interface."]
65-
pub has_epoch_changed: bool,
6663
/// Identity claims present in the sender credential
6764
/// Present for all messages
6865
pub identity: WireIdentity,
@@ -88,25 +85,19 @@ pub struct MlsBufferedConversationDecryptMessage {
8885
/// see [MlsConversationDecryptMessage]
8986
pub sender_client_id: Option<ClientId>,
9087
/// see [MlsConversationDecryptMessage]
91-
#[deprecated = "This member will be removed in the future. Prefer using the `EpochObserver` interface."]
92-
pub has_epoch_changed: bool,
93-
/// see [MlsConversationDecryptMessage]
9488
pub identity: WireIdentity,
9589
/// see [MlsConversationDecryptMessage]
9690
pub crl_new_distribution_points: NewCrlDistributionPoints,
9791
}
9892

9993
impl From<MlsConversationDecryptMessage> for MlsBufferedConversationDecryptMessage {
10094
fn from(from: MlsConversationDecryptMessage) -> Self {
101-
// we still support the `has_epoch_changed` field, though we'll remove it later
102-
#[expect(deprecated)]
10395
Self {
10496
app_msg: from.app_msg,
10597
proposals: from.proposals,
10698
is_active: from.is_active,
10799
delay: from.delay,
108100
sender_client_id: from.sender_client_id,
109-
has_epoch_changed: from.has_epoch_changed,
110101
identity: from.identity,
111102
crl_new_distribution_points: from.crl_new_distribution_points,
112103
}
@@ -237,15 +228,12 @@ impl ConversationGuard {
237228
"Application message"
238229
);
239230

240-
// we still support the `has_epoch_changed` field, though we'll remove it later
241-
#[expect(deprecated)]
242231
MlsConversationDecryptMessage {
243232
app_msg: Some(app_msg.into_bytes()),
244233
proposals: vec![],
245234
is_active: true,
246235
delay: None,
247236
sender_client_id: Some(sender_client_id),
248-
has_epoch_changed: false,
249237
identity,
250238
buffered_messages: None,
251239
crl_new_distribution_points: None.into(),
@@ -301,15 +289,12 @@ impl ConversationGuard {
301289
let conversation = self.conversation().await;
302290
let delay = conversation.compute_next_commit_delay();
303291

304-
// we still support the `has_epoch_changed` field, though we'll remove it later
305-
#[expect(deprecated)]
306292
MlsConversationDecryptMessage {
307293
app_msg: None,
308294
proposals: vec![],
309295
is_active: true,
310296
delay,
311297
sender_client_id: None,
312-
has_epoch_changed: false,
313298
identity,
314299
buffered_messages: None,
315300
crl_new_distribution_points,
@@ -411,15 +396,12 @@ impl ConversationGuard {
411396
);
412397
client.notify_epoch_changed(conversation.id.clone(), epoch).await;
413398

414-
// we still support the `has_epoch_changed` field, though we'll remove it later
415-
#[expect(deprecated)]
416399
MlsConversationDecryptMessage {
417400
app_msg: None,
418401
proposals,
419402
is_active: conversation.group.is_active(),
420403
delay: conversation.compute_next_commit_delay(),
421404
sender_client_id: None,
422-
has_epoch_changed: true,
423405
identity,
424406
buffered_messages,
425407
crl_new_distribution_points,
@@ -440,15 +422,12 @@ impl ConversationGuard {
440422
.map_err(RecursiveError::mls_credential("getting new crl distribution points"))?;
441423
conversation.group.store_pending_proposal(*proposal);
442424

443-
// we still support the `has_epoch_changed` field, though we'll remove it later
444-
#[expect(deprecated)]
445425
MlsConversationDecryptMessage {
446426
app_msg: None,
447427
proposals: vec![],
448428
is_active: true,
449429
delay: conversation.compute_next_commit_delay(),
450430
sender_client_id: None,
451-
has_epoch_changed: false,
452431
identity,
453432
buffered_messages: None,
454433
crl_new_distribution_points,

crypto/src/mls/conversation/own_commit.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,12 @@ impl MlsConversation {
114114
.await
115115
.map_err(RecursiveError::mls_credential("getting new crl distribution points"))?;
116116

117-
// we still support the `has_epoch_changed` field, though we'll remove it later
118-
#[expect(deprecated)]
119117
Ok(MlsConversationDecryptMessage {
120118
app_msg: None,
121119
proposals: vec![],
122120
is_active: self.group.is_active(),
123121
delay: self.compute_next_commit_delay(),
124122
sender_client_id: None,
125-
has_epoch_changed: true,
126123
identity,
127124
buffered_messages: None,
128125
crl_new_distribution_points,

crypto/src/mls/conversation/pending_conversation.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,19 +199,12 @@ impl PendingConversation {
199199
.await
200200
.map_err(RecursiveError::mls_credential("getting new crl distribution points"))?;
201201

202-
// Note that though we return `has_epoch_changed: true` here, we don't notify the observer.
203-
// This function can only be reached via a code path going through `MlsConversation::decrypt_message`
204-
// which already notifies the observer; it would be redundant to notify here also.
205-
206-
// we still support the `has_epoch_changed` field, though we'll remove it later
207-
#[expect(deprecated)]
208202
Ok(MlsConversationDecryptMessage {
209203
app_msg: None,
210204
proposals: vec![],
211205
is_active: conversation.group.is_active(),
212206
delay: conversation.compute_next_commit_delay(),
213207
sender_client_id: None,
214-
has_epoch_changed: true,
215208
identity,
216209
buffered_messages,
217210
crl_new_distribution_points,

0 commit comments

Comments
 (0)