feat(#553): animate reaction WS event (ily / <3 / good bot → hearts)

This commit is contained in:
M57 authored and GitHub committed 2026-07-12 05:11:17 +03:00
1 parent cc917afcbd
commit 306861a222
5 files changed
+143 -1

No files matched your search

@@ -126,6 +126,11 @@ object EventParser {
WsEvent.SessionUpdated(payload)
}
"reaction" -> {
val kind = payload?.get("kind") as? String ?: ""
WsEvent.ReactionEvent(kind)
}
"approval.request" -> {
val command = payload?.get("command") as? String
val description = payload?.get("description") as? String
@@ -152,6 +152,17 @@ sealed class WsEvent {
val data: Map<String, Any?>?,
) : WsEvent()
// ── Reaction event ────────────────────────────────────────────────────
/**
* Backend emitted an affection reaction (ily / <3 / good bot).
* Payload: `{ "kind": "<str>" }`. Purely cosmetic — play a hearts
* animation in the chat UI; no persistence needed.
*/
data class ReactionEvent(
val kind: String = "",
) : WsEvent()
// ── Fallback ─────────────────────────────────────────────────────────
data class Unknown(