mirror of https://github.com/oxen-io/session-ios
				
				
				
			
			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.
		
		
		
		
		
			
		
			
				
	
	
		
			32 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Objective-C
		
	
			
		
		
	
	
			32 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Objective-C
		
	
| //
 | |
| //  Copyright (c) 2018 Open Whisper Systems. All rights reserved.
 | |
| //
 | |
| 
 | |
| #import <SessionMessagingKit/TSThread.h>
 | |
| 
 | |
| NS_ASSUME_NONNULL_BEGIN
 | |
| 
 | |
| extern NSString *const TSContactThreadPrefix;
 | |
| 
 | |
| @interface TSContactThread : TSThread
 | |
| 
 | |
| - (instancetype)initWithContactSessionID:(NSString *)contactSessionID;
 | |
| 
 | |
| + (instancetype)getOrCreateThreadWithContactSessionID:(NSString *)contactSessionID NS_SWIFT_NAME(getOrCreateThread(contactSessionID:));
 | |
| 
 | |
| + (instancetype)getOrCreateThreadWithContactSessionID:(NSString *)contactSessionID
 | |
|                                           transaction:(YapDatabaseReadWriteTransaction *)transaction;
 | |
| 
 | |
| // Unlike getOrCreateThreadWithContactSessionID, this will _NOT_ create a thread if one does not already exist.
 | |
| + (nullable instancetype)getThreadWithContactSessionID:(NSString *)contactSessionID transaction:(YapDatabaseReadTransaction *)transaction NS_SWIFT_NAME(fetch(for:using:));
 | |
| 
 | |
| - (NSString *)contactSessionID;
 | |
| 
 | |
| + (NSString *)contactSessionIDFromThreadID:(NSString *)threadId;
 | |
| 
 | |
| + (NSString *)threadIDFromContactSessionID:(NSString *)contactSessionID;
 | |
| 
 | |
| @end
 | |
| 
 | |
| NS_ASSUME_NONNULL_END
 |