TM-SGNL-iOS/SignalServiceKit/Messages/OWSOutgoingSenderKeyDistributionMessage.h
TeleMessage developers dde0620daf initial commit
2025-05-03 12:28:28 -07:00

40 lines
2.1 KiB
Objective-C

//
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
//
#import <SignalServiceKit/TSOutgoingMessage.h>
@class TSContactThread;
NS_ASSUME_NONNULL_BEGIN
@interface OWSOutgoingSenderKeyDistributionMessage : TSOutgoingMessage
- (instancetype)initOutgoingMessageWithBuilder:(TSOutgoingMessageBuilder *)outgoingMessageBuilder
recipientAddressStates:
(NSDictionary<SignalServiceAddress *, TSOutgoingMessageRecipientState *> *)
recipientAddressStates NS_UNAVAILABLE;
- (instancetype)initOutgoingMessageWithBuilder:(TSOutgoingMessageBuilder *)outgoingMessageBuilder
additionalRecipients:(NSArray<SignalServiceAddress *> *)additionalRecipients
explicitRecipients:(NSArray<AciObjC *> *)explicitRecipients
skippedRecipients:(NSArray<SignalServiceAddress *> *)skippedRecipients
transaction:(SDSAnyReadTransaction *)transaction NS_UNAVAILABLE;
- (instancetype)initWithThread:(TSContactThread *)destinationThread
senderKeyDistributionMessageBytes:(NSData *)skdmBytes
transaction:(SDSAnyReadTransaction *)transaction;
/// Returns YES if this message is being sent as a precondition to sending an online-only message.
/// Typing indicators are only delivered to online devices. Since they're ephemeral we just don't bother sending a
/// typing indicator to a recipient if we need the user to verify a safety number change. Outgoing SKDMs being sent on
/// behalf of an outgoing typing indicator should inherit this behavior.
@property (assign, atomic, readonly) BOOL isSentOnBehalfOfOnlineMessage;
/// Returns YES if this message is being sent as a precondition to sending a story message.
@property (assign, atomic, readonly) BOOL isSentOnBehalfOfStoryMessage;
- (void)configureAsSentOnBehalfOf:(TSOutgoingMessage *)message
inThread:(TSThread *)thread NS_SWIFT_NAME(configureAsSentOnBehalfOf(_:in:));
@end
NS_ASSUME_NONNULL_END