Push-Definitions/Sources/PushMessageDefinitions/AuthenticatedPushMessage.swift
2022-06-09 11:48:00 +02:00

28 lines
779 B
Swift

import Foundation
/**
A push message to send to the push server.
This structure contains the content of the notification, as well as all data to send the notification to one or more recipients.
The message contains the authorization of the sender as well.
*/
public struct AuthenticatedPushMessage: Codable {
/// The device sending the message
public let sender: DeviceAuthentication
/// The message to send
public let message: PushMessage
/**
Create an authenticated push message
- Parameter sender: The authentication of the sender
- Parameter message: The message metadata and content
*/
public init(sender: DeviceAuthentication, message: PushMessage) {
self.sender = sender
self.message = message
}
}