mirror of https://github.com/oxen-io/session-ios
EndSessionMessage notifies remote side of reset session
Otherwise they'll send us messages we can't decrypt. Also: Log and fail when message doesn't send due to no thread being specified. // FREEBIEpull/1/head
parent
47cad611e5
commit
b4c504f61d
@ -0,0 +1,13 @@
|
||||
// Created by Michael Kirk on 11/3/16.
|
||||
// Copyright © 2016 Open Whisper Systems. All rights reserved.
|
||||
|
||||
#import "TSOutgoingMessage.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
NS_SWIFT_NAME(EndSessionMessage)
|
||||
@interface OWSEndSessionMessage : TSOutgoingMessage
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@ -0,0 +1,28 @@
|
||||
// Created by Michael Kirk on 11/3/16.
|
||||
// Copyright © 2016 Open Whisper Systems. All rights reserved.
|
||||
|
||||
#import "OWSEndSessionMessage.h"
|
||||
#import "OWSSignalServiceProtos.pb.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@implementation OWSEndSessionMessage
|
||||
|
||||
- (void)saveWithTransaction:(YapDatabaseReadWriteTransaction *)transaction
|
||||
{
|
||||
// override superclass with no-op.
|
||||
//
|
||||
// There's no need to save this message, since it's not displayed to the user.
|
||||
}
|
||||
|
||||
- (OWSSignalServiceProtosDataMessageBuilder *)dataMessageBuilder
|
||||
{
|
||||
OWSSignalServiceProtosDataMessageBuilder *builder = [super dataMessageBuilder];
|
||||
[builder setFlags:OWSSignalServiceProtosDataMessageFlagsEndSession];
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
Loading…
Reference in New Issue