Enable file attachments
This commit is contained in:
parent
ec5ce16fbe
commit
984f732324
|
@ -3513,7 +3513,6 @@ typedef enum : NSUInteger {
|
|||
[gifAction setValue:gifImage forKey:@"image"];
|
||||
[actionSheet addAction:gifAction];
|
||||
|
||||
/*
|
||||
UIAlertAction *chooseDocumentAction =
|
||||
[UIAlertAction actionWithTitle:NSLocalizedString(@"MEDIA_FROM_DOCUMENT_PICKER_BUTTON",
|
||||
@"action sheet button title when choosing attachment type")
|
||||
|
@ -3527,6 +3526,7 @@ typedef enum : NSUInteger {
|
|||
[chooseDocumentAction setValue:chooseDocumentImage forKey:@"image"];
|
||||
[actionSheet addAction:chooseDocumentAction];
|
||||
|
||||
/*
|
||||
if (kIsSendingContactSharesEnabled) {
|
||||
UIAlertAction *chooseContactAction =
|
||||
[UIAlertAction actionWithTitle:NSLocalizedString(@"ATTACHMENT_MENU_CONTACT_BUTTON",
|
||||
|
|
|
@ -1221,7 +1221,9 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException";
|
|||
for (NSString *attachmentID in message.attachmentIds) {
|
||||
TSAttachmentStream *attachment = [TSAttachmentStream fetchObjectWithUniqueID:attachmentID];
|
||||
if (attachment == nil) { continue; }
|
||||
[groupMessage addAttachmentWithKind:@"attachment" server:publicChat.server serverID:attachment.serverId contentType:attachment.contentType size:attachment.byteCount fileName:attachment.sourceFilename flags:0 width:@(attachment.imageSize.width).unsignedIntegerValue height:@(attachment.imageSize.height).unsignedIntegerValue caption:attachment.caption url:attachment.downloadURL linkPreviewURL:nil linkPreviewTitle:nil];
|
||||
NSUInteger width = attachment.shouldHaveImageSize ? @(attachment.imageSize.width).unsignedIntegerValue : 0;
|
||||
NSUInteger height = attachment.shouldHaveImageSize ? @(attachment.imageSize.height).unsignedIntegerValue : 0;
|
||||
[groupMessage addAttachmentWithKind:@"attachment" server:publicChat.server serverID:attachment.serverId contentType:attachment.contentType size:attachment.byteCount fileName:attachment.sourceFilename flags:0 width:width height:height caption:attachment.caption url:attachment.downloadURL linkPreviewURL:nil linkPreviewTitle:nil];
|
||||
}
|
||||
[[LKPublicChatAPI sendMessage:groupMessage toGroup:publicChat.channel onServer:publicChat.server]
|
||||
.thenOn(OWSDispatch.sendingQueue, ^(LKGroupMessage *groupMessage) {
|
||||
|
|
Loading…
Reference in New Issue