mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
e61c818738
What we *previously* refered to as attachments are actually just the attachment's id (NSString). This has tripped me up a few too many times. Also, use generics with attachment id's array. // FREEBIE
30 lines
822 B
Objective-C
30 lines
822 B
Objective-C
// Created by Frederic Jacobs on 12/11/14.
|
|
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
|
|
|
|
#import "TSInteraction.h"
|
|
|
|
/**
|
|
* Abstract message class.
|
|
*/
|
|
|
|
typedef NS_ENUM(NSInteger, TSGroupMetaMessage) {
|
|
TSGroupMessageNone,
|
|
TSGroupMessageNew,
|
|
TSGroupMessageUpdate,
|
|
TSGroupMessageDeliver,
|
|
TSGroupMessageQuit
|
|
};
|
|
@interface TSMessage : TSInteraction
|
|
|
|
@property (nonatomic, readonly) NSMutableArray<NSString *> *attachmentIds;
|
|
@property (nonatomic) NSString *body;
|
|
@property (nonatomic) TSGroupMetaMessage groupMetaMessage;
|
|
|
|
- (instancetype)initWithTimestamp:(uint64_t)timestamp
|
|
inThread:(TSThread *)thread
|
|
messageBody:(NSString *)body
|
|
attachmentIds:(NSArray<NSString *> *)attachmentIds;
|
|
|
|
- (BOOL)hasAttachments;
|
|
|
|
@end
|