Skip to content

Commit

Permalink
Add JS SessionRefresh before/after hook functions
Browse files Browse the repository at this point in the history
  • Loading branch information
zyro authored and sesposito committed Oct 29, 2024
1 parent 0930eb8 commit bc1a2bc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions server/runtime_javascript_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ func (im *RuntimeJavascriptInitModule) mappings(r *goja.Runtime) map[string]func
"registerAfterAuthenticateGoogle": im.registerAfterAuthenticateGoogle(r),
"registerBeforeAuthenticateSteam": im.registerBeforeAuthenticateSteam(r),
"registerAfterAuthenticateSteam": im.registerAfterAuthenticateSteam(r),
"registerBeforeSessionRefresh": im.registerBeforeSessionRefresh(r),
"registerAfterSessionRefresh": im.registerAfterSessionRefresh(r),
"registerBeforeListChannelMessages": im.registerBeforeListChannelMessages(r),
"registerAfterListChannelMessages": im.registerAfterListChannelMessages(r),
"registerBeforeListFriends": im.registerBeforeListFriends(r),
Expand Down Expand Up @@ -498,6 +500,14 @@ func (im *RuntimeJavascriptInitModule) registerAfterAuthenticateSteam(r *goja.Ru
return im.registerHook(r, RuntimeExecutionModeAfter, "registerAfterAuthenticateSteam", "authenticatesteam")
}

func (im *RuntimeJavascriptInitModule) registerBeforeSessionRefresh(r *goja.Runtime) func(goja.FunctionCall) goja.Value {
return im.registerHook(r, RuntimeExecutionModeBefore, "registerBeforeSessionRefresh", "sessionrefresh")
}

func (im *RuntimeJavascriptInitModule) registerAfterSessionRefresh(r *goja.Runtime) func(goja.FunctionCall) goja.Value {
return im.registerHook(r, RuntimeExecutionModeAfter, "registerAfterSessionRefresh", "sessionrefresh")
}

func (im *RuntimeJavascriptInitModule) registerBeforeListChannelMessages(r *goja.Runtime) func(goja.FunctionCall) goja.Value {
return im.registerHook(r, RuntimeExecutionModeBefore, "registerBeforeListChannelMessages", "listchannelmessages")
}
Expand Down

0 comments on commit bc1a2bc

Please sign in to comment.