session-ios/SessionMessagingKit/Open Groups/Models/UpdateMessageRequest.swift
Morgan Pretty b655882cbd Started resolving TODOs
Added some new properties to the OpenGroupV2
Moved a number of methods and variables from OpenGroupAPI to OpenGroupManager (anything doing actual logic)
Moved the message signing into the OpenGroupAPI (since that's the only place it happens)
Renamed remaining old model classes to start with 'Legacy' to make clean up easier
Updated the OpenGroupAPI poll method to use the same logic as it previously did to determine if it should retrieve recent messages or messages since the last one
2022-02-16 10:31:08 +11:00

20 lines
613 B
Swift

// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
import Foundation
extension OpenGroupAPI {
public struct UpdateMessageRequest: Codable {
let data: Data
let signature: Data
// MARK: - Encodable
public func encode(to encoder: Encoder) throws {
var container: KeyedEncodingContainer<CodingKeys> = encoder.container(keyedBy: CodingKeys.self)
try container.encode(data.base64EncodedString(), forKey: .data)
try container.encode(signature.base64EncodedString(), forKey: .signature)
}
}
}