2025-05-29 16:48:53 +05:30
|
|
|
import std/json
|
|
|
|
|
import ./json_base_event, ../../src/[message]
|
|
|
|
|
|
|
|
|
|
type JsonMessageReadyEvent* = ref object of JsonEvent
|
|
|
|
|
messageId*: SdsMessageID
|
2025-07-17 14:13:21 +05:30
|
|
|
channelId*: SdsChannelID
|
2025-05-29 16:48:53 +05:30
|
|
|
|
2025-07-17 14:13:21 +05:30
|
|
|
proc new*(T: type JsonMessageReadyEvent, messageId: SdsMessageID, channelId: SdsChannelID): T =
|
|
|
|
|
return JsonMessageReadyEvent(eventType: "message_ready", messageId: messageId, channelId: channelId)
|
2025-05-29 16:48:53 +05:30
|
|
|
|
|
|
|
|
method `$`*(jsonMessageReady: JsonMessageReadyEvent): string =
|
|
|
|
|
$(%*jsonMessageReady)
|