Fix: Cannot receive phone numbers

This commit is contained in:
Leon Böttger committed 2025-11-13 21:34:06 +01:00
1 parent 9536854fa2
commit 70a6b5ff3e
2 files changed
+46 -53

No files matched your search

@@ -527,23 +527,16 @@ class InboundNearbyConnection: NearbyConnection {
checkIfCanProceed(metadata: metadata)
}
else if let textMetadata = frame.v1.introduction.textMetadata.first {
let isURL = textMetadata.type == .url
if textMetadata.type == .url || textMetadata.type == .text {
let isClipboardText = textMetadata.type == .text
let metadata = TransferMetadata(files: [], id: id, pinCode: pinCode, textDescription: textMetadata.textTitle, transferType: isClipboardText ? .text : .url, allowsToBeAddedAsTrustedDevice: self.peerCertificate != nil)
textPayloadID = textMetadata.payloadID
if isClipboardText {
isPlainTextTransfer = true
}
checkIfCanProceed(metadata: metadata)
}
else {
rejectDueToUnsupportedFileType(frame)
let metadata = TransferMetadata(files: [], id: id, pinCode: pinCode, textDescription: textMetadata.textTitle, transferType: isURL ? .url : .text, allowsToBeAddedAsTrustedDevice: self.peerCertificate != nil)
textPayloadID = textMetadata.payloadID
if !isURL {
isPlainTextTransfer = true
}
checkIfCanProceed(metadata: metadata)
} else {
rejectDueToUnsupportedFileType(frame)
}