feat(#553): animate reaction WS event (ily / <3 / good bot → hearts)
This commit is contained in:
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(
|
||||
|
||||
Reference in new issue
Block a user