session-ios/src/Messages/Interactions/TSMessage.h

31 lines
822 B
C
Raw Normal View History

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"
/**
* Abstract message class.
2015-12-07 03:31:43 +01:00
*/
typedef NS_ENUM(NSInteger, TSGroupMetaMessage) {
TSGroupMessageNone,
TSGroupMessageNew,
TSGroupMessageUpdate,
TSGroupMessageDeliver,
TSGroupMessageQuit
};
@interface TSMessage : TSInteraction
@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
attachmentIds:(NSArray<NSString *> *)attachmentIds;
2015-12-07 03:31:43 +01:00
- (BOOL)hasAttachments;
@end