mirror of https://github.com/oxen-io/session-ios
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
	
	
		
			59 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			C
		
	
		
		
			
		
	
	
			59 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			C
		
	
| 
											8 years ago
										 | //
 | ||
|  | //  Copyright (c) 2018 Open Whisper Systems. All rights reserved.
 | ||
|  | //
 | ||
|  | 
 | ||
| 
											5 years ago
										 | #import <SignalUtilitiesKit/TSQuotedMessage.h>
 | ||
| 
											7 years ago
										 | 
 | ||
|  | NS_ASSUME_NONNULL_BEGIN | ||
|  | 
 | ||
| 
											7 years ago
										 | @protocol ConversationViewItem; | ||
|  | 
 | ||
| 
											8 years ago
										 | @class TSAttachmentPointer; | ||
| 
											8 years ago
										 | @class TSAttachmentStream; | ||
|  | @class TSMessage; | ||
|  | @class YapDatabaseReadTransaction; | ||
|  | 
 | ||
|  | // View model which has already fetched any attachments.
 | ||
|  | @interface OWSQuotedReplyModel : NSObject | ||
|  | 
 | ||
|  | @property (nonatomic, readonly) uint64_t timestamp; | ||
|  | @property (nonatomic, readonly) NSString *authorId; | ||
|  | @property (nonatomic, readonly, nullable) TSAttachmentStream *attachmentStream; | ||
| 
											8 years ago
										 | @property (nonatomic, readonly, nullable) TSAttachmentPointer *thumbnailAttachmentPointer; | ||
|  | @property (nonatomic, readonly) BOOL thumbnailDownloadFailed; | ||
| 
											8 years ago
										 | 
 | ||
|  | // This property should be set IFF we are quoting a text message
 | ||
|  | // or attachment with caption.
 | ||
|  | @property (nullable, nonatomic, readonly) NSString *body; | ||
| 
											7 years ago
										 | @property (nonatomic, readonly) BOOL isRemotelySourced; | ||
| 
											8 years ago
										 | 
 | ||
|  | #pragma mark - Attachments
 | ||
|  | 
 | ||
|  | // This is a MIME type.
 | ||
|  | //
 | ||
|  | // This property should be set IFF we are quoting an attachment message.
 | ||
|  | @property (nonatomic, readonly, nullable) NSString *contentType; | ||
|  | @property (nonatomic, readonly, nullable) NSString *sourceFilename; | ||
|  | @property (nonatomic, readonly, nullable) UIImage *thumbnailImage; | ||
|  | 
 | ||
| 
											7 years ago
										 | - (instancetype)init NS_UNAVAILABLE; | ||
| 
											8 years ago
										 | 
 | ||
| 
											8 years ago
										 | // Used for persisted quoted replies, both incoming and outgoing.
 | ||
| 
											7 years ago
										 | + (instancetype)quotedReplyWithQuotedMessage:(TSQuotedMessage *)quotedMessage | ||
| 
											6 years ago
										 |                                     threadId:(NSString *)threadId | ||
| 
											7 years ago
										 |                                  transaction:(YapDatabaseReadTransaction *)transaction; | ||
| 
											8 years ago
										 | 
 | ||
| 
											8 years ago
										 | // Builds a not-yet-sent QuotedReplyModel
 | ||
| 
											7 years ago
										 | + (nullable instancetype)quotedReplyForSendingWithConversationViewItem:(id<ConversationViewItem>)conversationItem | ||
| 
											6 years ago
										 |                                                               threadId:(NSString *)threadId | ||
| 
											7 years ago
										 |                                                            transaction:(YapDatabaseReadTransaction *)transaction; | ||
| 
											8 years ago
										 | 
 | ||
| 
											7 years ago
										 | - (TSQuotedMessage *)buildQuotedMessageForSending; | ||
| 
											8 years ago
										 | 
 | ||
| 
											6 years ago
										 | // Loki
 | ||
|  | @property (nonatomic, readonly) NSString *threadId; | ||
|  | 
 | ||
| 
											8 years ago
										 | @end | ||
|  | 
 | ||
|  | NS_ASSUME_NONNULL_END |