Simplify API for sending messages

This commit is contained in:
Moez Bhatti
2018-06-27 16:22:42 -04:00
parent e8765a22df
commit 81d77eb1d9
6 changed files with 99 additions and 96 deletions
@@ -12,4 +12,17 @@ open class ScheduledMessage(
var sendAsGroup: Boolean = true,
var body: String = "",
var attachments: RealmList<String> = RealmList()
) : RealmObject()
) : RealmObject() {
fun copy(id: Long = this.id,
date: Long = this.date,
subId: Int = this.subId,
recipients: RealmList<String> = this.recipients,
sendAsGroup: Boolean = this.sendAsGroup,
body: String = this.body,
attachments: RealmList<String> = this.attachments): ScheduledMessage {
return ScheduledMessage(id, date, subId, recipients, sendAsGroup, body, attachments)
}
}