Skip to content
Snippets Groups Projects
Select Git revision
  • 0e26c3cfb993f07916792296bd97fb72d5b02f0c
  • main default protected
  • dev protected
  • hotfixes-oct-2022
  • refactor/avatar-cell
  • 1.1.5
  • 1.1.4
  • 1.1.3
  • 1.1
  • 1.0.8
  • 1.0.7
  • 1.0.6
12 results

Session+Notifications.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)
      }
    }