Path: blob/main/SignalServiceKit/Messages/OWSReadTracking.h
1 views
//1// Copyright 2017 Signal Messenger, LLC2// SPDX-License-Identifier: AGPL-3.0-only3//45NS_ASSUME_NONNULL_BEGIN67@class DBWriteTransaction;8@class TSThread;910typedef NS_CLOSED_ENUM(NSInteger, OWSReceiptCircumstance) {11OWSReceiptCircumstanceOnLinkedDevice,12OWSReceiptCircumstanceOnLinkedDeviceWhilePendingMessageRequest,13OWSReceiptCircumstanceOnThisDevice,14OWSReceiptCircumstanceOnThisDeviceWhilePendingMessageRequest15};1617/**18* Some interactions track read/unread status.19* e.g. incoming messages and call notifications20*/21@protocol OWSReadTracking <NSObject>2223/**24* Has the local user seen the interaction?25*/26@property (nonatomic, readonly, getter=wasRead) BOOL read;2728@property (nonatomic, readonly) NSString *uniqueId;29@property (nonatomic, readonly) uint64_t expireStartedAt;30@property (nonatomic, readonly) uint64_t sortId;31@property (nonatomic, readonly) NSString *uniqueThreadId;323334/**35* Used both for *responding* to a remote read receipt and in response to the local user's activity.36*/37- (void)markAsReadAtTimestamp:(uint64_t)readTimestamp38thread:(TSThread *)thread39circumstance:(OWSReceiptCircumstance)circumstance40shouldClearNotifications:(BOOL)shouldClearNotifications41transaction:(DBWriteTransaction *)transaction;4243@end4445NS_ASSUME_NONNULL_END464748