mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
32 lines
834 B
Objective-C
32 lines
834 B
Objective-C
//
|
|
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
|
//
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
extern NSString *const kNSNotificationName_BlockedPhoneNumbersDidChange;
|
|
|
|
// This class can be safely accessed and used from any thread.
|
|
@interface OWSBlockingManager : NSObject
|
|
|
|
- (instancetype)init NS_UNAVAILABLE;
|
|
|
|
+ (instancetype)sharedManager;
|
|
|
|
- (void)addBlockedPhoneNumber:(NSString *)phoneNumber;
|
|
|
|
- (void)removeBlockedPhoneNumber:(NSString *)phoneNumber;
|
|
|
|
// When updating the block list from a sync message, we don't
|
|
// want to fire a sync message.
|
|
- (void)setBlockedPhoneNumbers:(NSArray<NSString *> *)blockedPhoneNumbers sendSyncMessage:(BOOL)sendSyncMessage;
|
|
|
|
- (NSArray<NSString *> *)blockedPhoneNumbers;
|
|
|
|
- (BOOL)isRecipientIdBlocked:(NSString *)recipientId;
|
|
|
|
- (void)syncBlockedPhoneNumbers;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|