2015-12-07 03:31:43 +01:00
|
|
|
// Created by Frederic Jacobs on 12/11/14.
|
|
|
|
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
|
|
|
|
|
|
|
|
#import "TSInteraction.h"
|
|
|
|
|
|
|
|
/**
|
2016-07-28 01:58:49 +02:00
|
|
|
* Abstract message class.
|
2015-12-07 03:31:43 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
typedef NS_ENUM(NSInteger, TSGroupMetaMessage) {
|
|
|
|
TSGroupMessageNone,
|
|
|
|
TSGroupMessageNew,
|
|
|
|
TSGroupMessageUpdate,
|
|
|
|
TSGroupMessageDeliver,
|
|
|
|
TSGroupMessageQuit
|
|
|
|
};
|
|
|
|
@interface TSMessage : TSInteraction
|
|
|
|
|
2016-07-29 21:33:25 +02:00
|
|
|
@property (nonatomic, readonly) NSMutableArray<NSString *> *attachmentIds;
|
2015-12-07 03:31:43 +01:00
|
|
|
@property (nonatomic) NSString *body;
|
|
|
|
@property (nonatomic) TSGroupMetaMessage groupMetaMessage;
|
|
|
|
|
|
|
|
- (instancetype)initWithTimestamp:(uint64_t)timestamp
|
|
|
|
inThread:(TSThread *)thread
|
|
|
|
messageBody:(NSString *)body
|
2016-07-29 21:33:25 +02:00
|
|
|
attachmentIds:(NSArray<NSString *> *)attachmentIds;
|
2015-12-07 03:31:43 +01:00
|
|
|
|
|
|
|
- (BOOL)hasAttachments;
|
|
|
|
|
|
|
|
@end
|