replacing sealed class with interface

This commit is contained in:
Adam Brown 2022-10-01 11:28:06 +01:00 committed by Adam Brown
parent fa177de185
commit 7a8b91a376
1 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ interface MessageService : MatrixService {
}
@Serializable
sealed class Message {
sealed interface Message {
@Serializable
@SerialName("text_message")
data class TextMessage(
@ -40,7 +40,7 @@ interface MessageService : MatrixService {
@SerialName("local_id") val localId: String,
@SerialName("timestamp") val timestampUtc: Long,
@SerialName("reply") val reply: Reply? = null,
) : Message() {
) : Message {
@Serializable
data class Reply(
val authorId: UserId,
@ -58,7 +58,7 @@ interface MessageService : MatrixService {
@SerialName("room_id") val roomId: RoomId,
@SerialName("local_id") val localId: String,
@SerialName("timestamp") val timestampUtc: Long,
) : Message()
) : Message
@Serializable
sealed class Content {