mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Merge branch 'charlesmchen/linkPreviewsVsIncomingAttachments'
This commit is contained in:
commit
1ab5a7ed6b
|
@ -116,6 +116,10 @@ public class OWSLinkPreview: MTLModel {
|
|||
guard let previewProto = dataMessage.preview.first else {
|
||||
throw LinkPreviewError.noPreview
|
||||
}
|
||||
guard dataMessage.attachments.count < 1 else {
|
||||
Logger.error("Discarding link preview; message has attachments.")
|
||||
throw LinkPreviewError.invalidInput
|
||||
}
|
||||
let urlString = previewProto.url
|
||||
|
||||
guard URL(string: urlString) != nil else {
|
||||
|
|
Loading…
Reference in a new issue