Skip to content

Commit ebdf05d

Browse files
committed
Revert "fix: sending messages - WPB-20880 (#3828)"
This reverts commit b6fc8da.
1 parent b6fc8da commit ebdf05d

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

wire-ios-request-strategy/Sources/Request Strategies/Assets/AssetClientMessageRequestStrategy.swift

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,21 +81,6 @@ extension AssetClientMessageRequestStrategy: InsertedObjectSyncTranscoder {
8181
return
8282
}
8383

84-
if object.shouldExpire, object.expirationDate?.isInThePast == true {
85-
// When unsent messages past their expiration date they should be expired.
86-
// It's likely this message failed to send before but the app crashed or was
87-
// terminated before it succeeded.
88-
WireLogger.messaging.info(
89-
"asset message expired before sending: \(object)",
90-
attributes: [.nonce: object.nonce?.safeForLoggingDescription ?? "<nil>"],
91-
.safePublic
92-
)
93-
object.expire(withReason: .timeout)
94-
managedObjectContext.saveOrRollback()
95-
completion()
96-
return
97-
}
98-
9984
let logAttributesBuilder = MessageLogAttributesBuilder(context: managedObjectContext)
10085
let logAttributes = logAttributesBuilder.syncLogAttributes(object)
10186
WireLogger.messaging.debug("inserting message", attributes: logAttributes)

wire-ios-request-strategy/Sources/Request Strategies/Client Message/ClientMessageRequestStrategy.swift

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -110,20 +110,6 @@ extension ClientMessageRequestStrategy: InsertedObjectSyncTranscoder {
110110
return
111111
}
112112

113-
if object.shouldExpire, object.expirationDate?.isInThePast == true {
114-
// When unsent messages past their expiration date they should be expired.
115-
// It's likely this message failed to send before but the app crashed or was
116-
// terminated before it succeeded.
117-
WireLogger.messaging.info(
118-
"client message expired before sending: \(object)",
119-
attributes: [.nonce: object.nonce?.safeForLoggingDescription ?? "<nil>"],
120-
.safePublic
121-
)
122-
object.expire(withReason: .timeout)
123-
context.saveOrRollback()
124-
completion()
125-
return
126-
}
127113
let logAttributesBuilder = MessageLogAttributesBuilder(context: context)
128114
let logAttributes = logAttributesBuilder.syncLogAttributes(object)
129115
WireLogger.messaging.debug("inserting message", attributes: logAttributes)

0 commit comments

Comments
 (0)