session-ios/src/Messages/Interactions/TSMessage.h
Michael Kirk e61c818738 Clarify message.attachments -> attachmentIds
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
2016-07-31 08:49:01 -07:00

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