Skip to content

Commit

Permalink
Rename the recompute param
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviofernandes004 committed Aug 2, 2023
1 parent 1d6f063 commit 278d403
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions server/runtime_javascript_nakama.go
Original file line number Diff line number Diff line change
Expand Up @@ -8294,12 +8294,12 @@ func (n *runtimeJavascriptNakamaModule) satoriPropertiesUpdate(r *goja.Runtime)
properties.Custom = customPropsMap
}

if recompute, ok := props["recomputeAudiences"]; ok {
if recompute, ok := props["recompute"]; ok {
recomputeBool, ok := recompute.(bool)
if !ok {
panic(r.NewTypeError("expects recomputeAudiences to be a boolean"))
panic(r.NewTypeError("expects recompute to be a boolean"))
}
properties.RecomputeAudiences = &recomputeBool
properties.Recompute = &recomputeBool
}

if err := n.satori.PropertiesUpdate(n.ctx, id, properties); err != nil {
Expand Down
8 changes: 4 additions & 4 deletions server/runtime_lua_nakama.go
Original file line number Diff line number Diff line change
Expand Up @@ -9986,14 +9986,14 @@ func (n *RuntimeLuaNakamaModule) satoriPropertiesUpdate(l *lua.LState) int {
return
}
properties.Custom = customMap
case "recomputeAudiences":
case "recompute":
if v.Type() != lua.LTBool {
conversionError = true
l.ArgError(3, "expects recomputeAudiences value to be a bool")
l.ArgError(3, "expects recompute value to be a bool")
return
}
recomputeAudiences := lua.LVAsBool(v)
properties.RecomputeAudiences = &recomputeAudiences
recompute := lua.LVAsBool(v)
properties.Recompute = &recompute
}
})

Expand Down

0 comments on commit 278d403

Please sign in to comment.