fix broken test
This commit is contained in:
parent
2233d4c72c
commit
b95dcd4ae3
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ConversationViewItem.h"
|
||||
|
@ -65,6 +65,7 @@
|
|||
OWSAssertDebug([[NSFileManager defaultManager] fileExistsAtPath:filePath]);
|
||||
|
||||
DataSource *dataSource = [DataSourcePath dataSourceWithFilePath:filePath shouldDeleteOnDeallocation:NO];
|
||||
dataSource.sourceFilename = filename;
|
||||
TSAttachmentStream *attachment = [AttachmentStreamFactory createWithContentType:mimeType dataSource:dataSource];
|
||||
|
||||
TSOutgoingMessage *message =
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
@ -391,6 +391,7 @@ class AttachmentStreamFactory: NSObject, Factory {
|
|||
let factory = AttachmentStreamFactory()
|
||||
factory.contentTypeBuilder = { return contentType }
|
||||
factory.byteCountBuilder = { return UInt32(dataSource.dataLength()) }
|
||||
factory.sourceFilenameBuilder = { return dataSource.sourceFilename ?? "fake-filename.dat" }
|
||||
|
||||
let attachmentStream = factory.build(transaction: transaction)
|
||||
dataSource.write(toPath: attachmentStream.originalFilePath!)
|
||||
|
|
Loading…
Reference in New Issue