session-ios/SignalServiceKit/src/Messages/OWSReadTracking.h
Michael Kirk 2eaaba9082 crashfix: on addObject, presumably it's nil.
I'm not sure how this is happening, but this will prevent the crash and
give us additional diagnostic data in the cases where it is happening.

// FREEBIE
2017-09-01 12:56:50 -04:00

30 lines
816 B
Objective-C

//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
@class YapDatabaseReadWriteTransaction;
/**
* Some interactions track read/unread status.
* e.g. incoming messages and call notifications
*/
@protocol OWSReadTracking <NSObject>
/**
* Has the local user seen the interaction?
*/
@property (nonatomic, readonly, getter=wasRead) BOOL read;
@property (nonatomic, readonly) uint64_t timestampForSorting;
@property (nonatomic, readonly) NSString *uniqueThreadId;
- (BOOL)shouldAffectUnreadCounts;
/**
* Used for *responding* to a remote read receipt or in response to user activity.
*/
- (void)markAsReadWithTransaction:(YapDatabaseReadWriteTransaction *)transaction
sendReadReceipt:(BOOL)sendReadReceipt
updateExpiration:(BOOL)updateExpiration;
@end