All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.raven.SmsService.kt Maven / Gradle / Ivy

There is a newer version: 3.0.11
Show newest version
package raven

import koncurrent.FailedLater
import koncurrent.Later

class SmsService(
    private val agents: Collection>
) : Service {
    override fun send(params: SendSmsParams): Later {
        val main = agents.firstOrNull() ?: return FailedLater("Main SmsAgent not found in sms service")
        val others = agents - main
        for (agent in others) agent.send(params)
        return main.send(params)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy