From 13ef05f8a2788004fe684c10a2a3ef6e3e397bab Mon Sep 17 00:00:00 2001 From: alemi Date: Tue, 17 Sep 2024 02:02:38 +0200 Subject: [PATCH] fix(lua): event type field --- .github/workflows/lua.yml | 1 + src/ffi/lua.rs | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lua.yml b/.github/workflows/lua.yml index 1d33d9c..7d4a411 100644 --- a/.github/workflows/lua.yml +++ b/.github/workflows/lua.yml @@ -3,6 +3,7 @@ name: lua on: push: branches: + - dev - stable permissions: diff --git a/src/ffi/lua.rs b/src/ffi/lua.rs index 2d23138..d1f3ba9 100644 --- a/src/ffi/lua.rs +++ b/src/ffi/lua.rs @@ -304,11 +304,14 @@ impl LuaUserData for CodempEvent { fn add_fields>(fields: &mut F) { fields.add_field_method_get("type", |_, this| match this { CodempEvent::FileTreeUpdated(_) => Ok("filetree"), - CodempEvent::UserJoin(_) | CodempEvent::UserLeave(_) => Ok("user"), + CodempEvent::UserJoin(_) => Ok("join"), + CodempEvent::UserLeave(_) => Ok("leave"), }); fields.add_field_method_get("value", |_, this| match this { - CodempEvent::FileTreeUpdated(x) => Ok(x.clone()), - CodempEvent::UserJoin(x) | CodempEvent::UserLeave(x) => Ok(x.clone()), + CodempEvent::FileTreeUpdated(x) + | CodempEvent::UserJoin(x) + | CodempEvent::UserLeave(x) + => Ok(x.clone()), }); } }