2014-11-19 21:17:53 +01:00
|
|
|
//
|
|
|
|
// TSIncomingMessage.h
|
|
|
|
// TextSecureKit
|
|
|
|
//
|
|
|
|
// Created by Frederic Jacobs on 15/11/14.
|
|
|
|
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import "TSMessage.h"
|
|
|
|
|
|
|
|
@interface TSIncomingMessage : TSMessage
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initiates an incoming message
|
|
|
|
*
|
|
|
|
* @param timestamp timestamp of the message in milliseconds since epoch
|
|
|
|
* @param thread thread to which the message belongs
|
|
|
|
* @param body body of the message
|
2014-12-21 12:52:42 +01:00
|
|
|
* @param attachments attachments of the message
|
2014-11-19 21:17:53 +01:00
|
|
|
*
|
|
|
|
* @return initiated incoming message
|
|
|
|
*/
|
|
|
|
|
|
|
|
- (instancetype)initWithTimestamp:(uint64_t)timestamp
|
|
|
|
inThread:(TSContactThread*)thread
|
|
|
|
messageBody:(NSString*)body
|
2014-12-21 12:52:42 +01:00
|
|
|
attachments:(NSArray*)attachments;
|
2014-11-19 21:17:53 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Initiates an incoming group message
|
|
|
|
*
|
|
|
|
* @param timestamp timestamp of the message in milliseconds since epoch
|
|
|
|
* @param thread thread to which the message belongs
|
|
|
|
* @param authorId author identifier of the user in the group that sent the message
|
|
|
|
* @param body body of the message
|
2014-12-21 12:52:42 +01:00
|
|
|
* @param attachments attachments of the message
|
2014-11-19 21:17:53 +01:00
|
|
|
*
|
|
|
|
* @return initiated incoming group message
|
|
|
|
*/
|
|
|
|
|
|
|
|
- (instancetype)initWithTimestamp:(uint64_t)timestamp
|
|
|
|
inThread:(TSGroupThread*)thread
|
|
|
|
authorId:(NSString*)authorId
|
|
|
|
messageBody:(NSString*)body
|
2015-02-28 15:27:56 +01:00
|
|
|
attachments:(NSArray*)attachments;
|
2014-11-19 21:17:53 +01:00
|
|
|
|
|
|
|
@property (nonatomic, readonly) NSString *authorId;
|
|
|
|
@property (nonatomic, getter = wasRead) BOOL read;
|
2015-02-28 15:27:56 +01:00
|
|
|
@property (nonatomic, readonly) NSDate *receivedAt;
|
2014-11-19 21:17:53 +01:00
|
|
|
|
|
|
|
@end
|