replacing sealed class with interface
This commit is contained in:
parent
fa177de185
commit
7a8b91a376
|
@ -30,7 +30,7 @@ interface MessageService : MatrixService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
sealed class Message {
|
sealed interface Message {
|
||||||
@Serializable
|
@Serializable
|
||||||
@SerialName("text_message")
|
@SerialName("text_message")
|
||||||
data class TextMessage(
|
data class TextMessage(
|
||||||
|
@ -40,7 +40,7 @@ interface MessageService : MatrixService {
|
||||||
@SerialName("local_id") val localId: String,
|
@SerialName("local_id") val localId: String,
|
||||||
@SerialName("timestamp") val timestampUtc: Long,
|
@SerialName("timestamp") val timestampUtc: Long,
|
||||||
@SerialName("reply") val reply: Reply? = null,
|
@SerialName("reply") val reply: Reply? = null,
|
||||||
) : Message() {
|
) : Message {
|
||||||
@Serializable
|
@Serializable
|
||||||
data class Reply(
|
data class Reply(
|
||||||
val authorId: UserId,
|
val authorId: UserId,
|
||||||
|
@ -58,7 +58,7 @@ interface MessageService : MatrixService {
|
||||||
@SerialName("room_id") val roomId: RoomId,
|
@SerialName("room_id") val roomId: RoomId,
|
||||||
@SerialName("local_id") val localId: String,
|
@SerialName("local_id") val localId: String,
|
||||||
@SerialName("timestamp") val timestampUtc: Long,
|
@SerialName("timestamp") val timestampUtc: Long,
|
||||||
) : Message()
|
) : Message
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
sealed class Content {
|
sealed class Content {
|
||||||
|
|
Loading…
Reference in New Issue