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.
		
		
		
		
		
			
		
			
	
	
		
			50 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Swift
		
	
		
		
			
		
	
	
			50 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Swift
		
	
| 
											7 years ago
										 | // | ||
|  | //  Copyright (c) 2018 Open Whisper Systems. All rights reserved. | ||
|  | // | ||
|  | 
 | ||
|  | import Foundation | ||
|  | 
 | ||
|  | @objc(OWSTypingIndicatorInteraction) | ||
|  | public class TypingIndicatorInteraction: TSInteraction { | ||
|  |     @objc | ||
|  |     public static let TypingIndicatorId = "TypingIndicator" | ||
|  | 
 | ||
|  |     @objc | ||
|  |     public override func isDynamicInteraction() -> Bool { | ||
|  |         return true | ||
|  |     } | ||
|  | 
 | ||
|  |     @objc | ||
|  |     public override func interactionType() -> OWSInteractionType { | ||
|  |         return .typingIndicator | ||
|  |     } | ||
|  | 
 | ||
|  |     @available(*, unavailable, message:"use other constructor instead.") | ||
|  |     @objc | ||
|  |     public required init(coder aDecoder: NSCoder) { | ||
|  |         notImplemented() | ||
|  |     } | ||
|  | 
 | ||
|  |     @available(*, unavailable, message:"use other constructor instead.") | ||
|  |     @objc | ||
| 
											5 years ago
										 |     public required init(dictionary dictionaryValue: [String: Any]!) throws { | ||
| 
											7 years ago
										 |         notImplemented() | ||
|  |     } | ||
|  | 
 | ||
|  |     @objc | ||
|  |     public let recipientId: String | ||
|  | 
 | ||
|  |     @objc | ||
|  |     public init(thread: TSThread, timestamp: UInt64, recipientId: String) { | ||
|  |         self.recipientId = recipientId | ||
|  | 
 | ||
|  |         super.init(interactionWithUniqueId: TypingIndicatorInteraction.TypingIndicatorId, | ||
|  |             timestamp: timestamp, in: thread) | ||
|  |     } | ||
| 
											7 years ago
										 | 
 | ||
|  |     @objc | ||
| 
											7 years ago
										 |     public override func save(with transaction: YapDatabaseReadWriteTransaction) { | ||
| 
											7 years ago
										 |         owsFailDebug("The transient interaction should not be saved in the database.") | ||
|  |     } | ||
| 
											7 years ago
										 | } |