mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
fe7171dd93
After provisioning a desktop client, you'll see messages sent from your phone appear on your desktop client, and messages sent from the desktop client appear on your phone. * In the process extracted some of the Attachment processing logic out of the giant MessagesManager. * Some nullability annotations on affected files. // FREEBIE
43 lines
1.4 KiB
Objective-C
43 lines
1.4 KiB
Objective-C
// Created by Frederic Jacobs on 11/11/14.
|
|
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
|
|
|
|
#import "TSIncomingMessage.h"
|
|
#import "TSInvalidIdentityKeySendingErrorMessage.h"
|
|
#import "TSOutgoingMessage.h"
|
|
|
|
@class TSCall;
|
|
@class YapDatabaseConnection;
|
|
@class OWSSignalServiceProtosEnvelope;
|
|
@class OWSSignalServiceProtosDataMessage;
|
|
|
|
@interface TSMessagesManager : NSObject
|
|
|
|
+ (instancetype)sharedManager;
|
|
|
|
@property (readonly) YapDatabaseConnection *dbConnection;
|
|
|
|
- (void)handleReceivedEnvelope:(OWSSignalServiceProtosEnvelope *)envelope;
|
|
|
|
- (void)processException:(NSException *)exception
|
|
outgoingMessage:(TSOutgoingMessage *)message
|
|
inThread:(TSThread *)thread;
|
|
|
|
/**
|
|
* Processes all kinds of incoming envelopes with a data message, along with any attachments.
|
|
*
|
|
* @returns
|
|
* If an incoming message is created, it will be returned. If it is, for example, a group update,
|
|
* no incoming message is created, so nil will be returned.
|
|
*/
|
|
- (TSIncomingMessage *)handleReceivedEnvelope:(OWSSignalServiceProtosEnvelope *)envelope
|
|
withDataMessage:(OWSSignalServiceProtosDataMessage *)dataMessage
|
|
attachmentIds:(NSArray<NSString *> *)attachmentIds;
|
|
|
|
- (void)handleSendToMyself:(TSOutgoingMessage *)outgoingMessage;
|
|
|
|
- (NSUInteger)unreadMessagesCount;
|
|
- (NSUInteger)unreadMessagesCountExcept:(TSThread *)thread;
|
|
- (NSUInteger)unreadMessagesInThread:(TSThread *)thread;
|
|
|
|
@end
|