mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.2 KiB
Matlab
45 lines
1.2 KiB
Matlab
10 years ago
|
//
|
||
|
// TSIncomingMessage.m
|
||
|
// TextSecureKit
|
||
|
//
|
||
|
// Created by Frederic Jacobs on 15/11/14.
|
||
|
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
|
||
|
//
|
||
|
|
||
|
#import "TSIncomingMessage.h"
|
||
|
|
||
|
@implementation TSIncomingMessage
|
||
|
|
||
|
- (instancetype)initWithTimestamp:(uint64_t)timestamp
|
||
|
inThread:(TSGroupThread *)thread
|
||
|
authorId:(NSString *)authorId
|
||
|
messageBody:(NSString *)body
|
||
|
attachments:(NSArray *)attachments {
|
||
|
self = [super initWithTimestamp:timestamp inThread:thread messageBody:body attachments:attachments];
|
||
|
|
||
|
if (self) {
|
||
|
_authorId = authorId;
|
||
|
_read = NO;
|
||
|
_receivedAt = [NSDate date];
|
||
|
}
|
||
|
|
||
|
return self;
|
||
|
}
|
||
|
|
||
|
- (instancetype)initWithTimestamp:(uint64_t)timestamp
|
||
|
inThread:(TSContactThread *)thread
|
||
|
messageBody:(NSString *)body
|
||
|
attachments:(NSArray *)attachments {
|
||
|
self = [super initWithTimestamp:timestamp inThread:thread messageBody:body attachments:attachments];
|
||
|
|
||
|
if (self) {
|
||
|
_authorId = nil;
|
||
|
_read = NO;
|
||
|
_receivedAt = [NSDate date];
|
||
|
}
|
||
|
|
||
|
return self;
|
||
|
}
|
||
|
|
||
|
@end
|