e-ntfy-android/app/src/main/java/io/heckel/ntfy/msg/Message.kt

41 lines
869 B
Kotlin
Raw Normal View History

2022-01-15 18:40:38 -05:00
package io.heckel.ntfy.msg
import androidx.annotation.Keep
2022-04-16 20:12:40 -04:00
import io.heckel.ntfy.db.Action
2022-01-15 18:40:38 -05:00
/* This annotation ensures that proguard still works in production builds,
* see https://stackoverflow.com/a/62753300/1440785 */
@Keep
data class Message(
val id: String,
val time: Long,
val event: String,
val topic: String,
val priority: Int?,
val tags: List<String>?,
val click: String?,
2022-04-16 20:12:40 -04:00
val actions: List<MessageAction>?,
2022-01-15 18:40:38 -05:00
val title: String?,
val message: String,
val encoding: String?,
2022-01-15 18:40:38 -05:00
val attachment: MessageAttachment?,
)
@Keep
data class MessageAttachment(
val name: String,
val type: String?,
val size: Long?,
val expires: Long?,
val url: String,
)
2022-04-16 20:12:40 -04:00
@Keep
data class MessageAction(
val action: String,
val label: String,
val url: String?,
)
const val MESSAGE_ENCODING_BASE64 = "base64"