Skip to content
Snippets Groups Projects
Select Git revision
  • 9dcf1f2dab75668671a5f989a7ce2c77421673c6
  • main default protected
  • development
  • integration
  • v1.1.5
  • v1.1.4
  • v1.1.3
  • v1.1.2
  • v1.1.1
  • v1.1.0
  • v1.0.0
11 results

GroupSendReport.swift

Blame
  • GroupSendReport.swift 704 B
    import Foundation
    
    public struct GroupSendReport: Equatable {
      public init(
        roundId: UInt64,
        timestamp: Int64,
        messageId: Data
      ) {
        self.roundId = roundId
        self.timestamp = timestamp
        self.messageId = messageId
      }
    
      public var roundId: UInt64
      public var timestamp: Int64
      public var messageId: Data
    }
    
    extension GroupSendReport: Codable {
      enum CodingKeys: String, CodingKey {
        case roundId = "RoundID"
        case timestamp = "Timestamp"
        case messageId = "MessageID"
      }
    
      public static func decode(_ data: Data) throws -> Self {
        try JSONDecoder().decode(Self.self, from: data)
      }
    
      public func encode() throws -> Data {
        try JSONEncoder().encode(self)
      }
    }