Files
Morgan Pretty 5e384eb7fb Moved and renamed remaining API definitions
• Cleaned up API structures to be more consistent
• Moved OpenGroupAPI into SessionNetworkingKit
• Moved PushNotificationAPI into SessionNetworkingKit
• Renamed to OpenGroupAPI to SOGSAPI
2025-09-15 14:22:39 +10:00

25 lines
749 B
Swift

// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
import Foundation
extension Network.SnodeAPI {
/// This is the legacy unauthenticated message store request
struct LegacySendMessagesRequest: Encodable {
enum CodingKeys: String, CodingKey {
case namespace
}
let message: SnodeMessage
let namespace: Network.SnodeAPI.Namespace
// MARK: - Coding
public func encode(to encoder: Encoder) throws {
var container: KeyedEncodingContainer<CodingKeys> = encoder.container(keyedBy: CodingKeys.self)
try message.encode(to: encoder)
try container.encode(namespace, forKey: .namespace)
}
}
}