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.
session-ios/Signal/src/util/ThreadUtil.h

51 lines
1.8 KiB
C

//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
@class TSThread;
@class OWSMessageSender;
@class SignalAttachment;
@class TSContactThread;
@class TSStorageManager;
@class OWSContactsManager;
@class OWSBlockingManager;
NS_ASSUME_NONNULL_BEGIN
@class TSUnreadIndicatorInteraction;
@interface ThreadOffersAndIndicators : NSObject
@property (nonatomic, nullable) TSUnreadIndicatorInteraction *unreadIndicator;
@end
#pragma mark -
@interface ThreadUtil : NSObject
+ (void)sendMessageWithText:(NSString *)text
inThread:(TSThread *)thread
messageSender:(OWSMessageSender *)messageSender;
+ (void)sendMessageWithAttachment:(SignalAttachment *)attachment
inThread:(TSThread *)thread
messageSender:(OWSMessageSender *)messageSender;
// This method will create and/or remove any offers and indicators
// necessary for this thread.
//
// * If hideUnreadMessagesIndicator is YES, there will be no "unread indicator".
// * Otherwise, if fixedUnreadIndicatorTimestamp is non-null, there will be a "unread indicator".
// * Otherwise, there will be a "unread indicator" if there is one unread message.
+ (ThreadOffersAndIndicators *)ensureThreadOffersAndIndicators:(TSThread *)thread
storageManager:(TSStorageManager *)storageManager
contactsManager:(OWSContactsManager *)contactsManager
blockingManager:(OWSBlockingManager *)blockingManager
hideUnreadMessagesIndicator:(BOOL)hideUnreadMessagesIndicator
fixedUnreadIndicatorTimestamp:(NSNumber *_Nullable)fixedUnreadIndicatorTimestamp;
@end
NS_ASSUME_NONNULL_END