2017-02-07 21:09:04 +01:00
|
|
|
//
|
2019-01-23 15:05:08 +01:00
|
|
|
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
2017-02-07 21:09:04 +01:00
|
|
|
//
|
|
|
|
|
2019-01-23 15:05:08 +01:00
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
2017-02-07 21:09:04 +01:00
|
|
|
@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;
|
|
|
|
|
2018-04-18 02:53:27 +02:00
|
|
|
@property (nonatomic, readonly) uint64_t expireStartedAt;
|
2018-10-03 23:41:43 +02:00
|
|
|
@property (nonatomic, readonly) uint64_t sortId;
|
2017-05-25 18:17:45 +02:00
|
|
|
@property (nonatomic, readonly) NSString *uniqueThreadId;
|
|
|
|
|
2018-04-18 02:53:27 +02:00
|
|
|
|
2017-05-25 18:17:45 +02:00
|
|
|
- (BOOL)shouldAffectUnreadCounts;
|
|
|
|
|
2017-02-07 21:09:04 +01:00
|
|
|
/**
|
2018-04-17 00:38:29 +02:00
|
|
|
* Used both for *responding* to a remote read receipt and in response to the local user's activity.
|
2017-02-07 21:09:04 +01:00
|
|
|
*/
|
2018-04-18 02:53:27 +02:00
|
|
|
- (void)markAsReadAtTimestamp:(uint64_t)readTimestamp
|
|
|
|
sendReadReceipt:(BOOL)sendReadReceipt
|
|
|
|
transaction:(YapDatabaseReadWriteTransaction *)transaction;
|
2017-02-07 21:09:04 +01:00
|
|
|
|
|
|
|
@end
|
2019-01-23 15:05:08 +01:00
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|