mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-21 13:55:58 +00:00
Fix: Cannot receive phone numbers
This commit is contained in:
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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user