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.
		
		
		
		
		
			
		
			
				
	
	
		
			35 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Swift
		
	
			
		
		
	
	
			35 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Swift
		
	
| // Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
 | |
| 
 | |
| import Foundation
 | |
| 
 | |
| extension OpenGroupAPI {
 | |
|     public struct DirectMessage: Codable {
 | |
|         enum CodingKeys: String, CodingKey {
 | |
|             case id
 | |
|             case sender
 | |
|             case recipient
 | |
|             case posted = "posted_at"
 | |
|             case expires = "expires_at"
 | |
|             case base64EncodedMessage = "message"
 | |
|         }
 | |
|         
 | |
|         /// The unique integer message id
 | |
|         public let id: Int64
 | |
|         
 | |
|         /// The (blinded) Session ID of the sender of the message
 | |
|         public let sender: String
 | |
|         
 | |
|         /// The (blinded) Session ID of the recipient of the message
 | |
|         public let recipient: String
 | |
|         
 | |
|         /// Unix timestamp when the message was received by SOGS
 | |
|         public let posted: TimeInterval
 | |
|         
 | |
|         /// Unix timestamp when SOGS will expire and delete the message
 | |
|         public let expires: TimeInterval
 | |
|         
 | |
|         /// The encrypted message body
 | |
|         public let base64EncodedMessage: String
 | |
|     }
 | |
| }
 |