Refactoring

This commit is contained in:
Leon Böttger committed 2025-11-15 14:11:20 +01:00
1 parent 9fd07e9326
commit 1256b91d4f
4 files changed
+27 -16

No files matched your search

@@ -537,8 +537,12 @@ class InboundNearbyConnection: NearbyConnection {
}
checkIfCanProceed(metadata: metadata)
} else {
rejectDueToUnsupportedFileType(frame)
}
else {
log("[InboundNearbyConnection \(self.id)] Rejecting transfer due to unsupported file type. Frame is \(frame.debugDescription)")
lastError = NearbyError.canceled(reason: .unsupportedType)
rejectTransfer(with: .unsupportedAttachmentType)
}
@@ -558,15 +562,6 @@ class InboundNearbyConnection: NearbyConnection {
}
}
func rejectDueToUnsupportedFileType(_ frame: Sharing_Nearby_Frame) {
log("[InboundNearbyConnection \(self.id)] Rejecting transfer due to unsupported file type. Frame is \(frame.debugDescription)")
lastError = NearbyError.canceled(reason: .unsupportedType)
rejectTransfer(with: .unsupportedAttachmentType)
}
func submitUserConsent(accepted: Bool, trustDevice: Bool) {
if trustDevice, let peerCertificate = peerCertificate, let remoteDeviceInfo = remoteDeviceInfo {