Skip to content

Commit 1d5b98e

Browse files
committed
Don't lose websession interface when casting to uisession
With the previous implementation, our `Client` field doesn't have the websession methods, so sandstorm barfs when a user tries to open a page.
1 parent 088a986 commit 1d5b98e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

websession/websession.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,8 @@ func (h HandlerWebSession) GetViewInfo(p grain.UiView_getViewInfo) error {
265265

266266
func (h HandlerWebSession) NewSession(p grain.UiView_newSession) error {
267267
// TODO: Check params.
268-
p.Results.SetSession(grain.UiSession_ServerToClient(h))
268+
client := capnp.WebSession_ServerToClient(h).Client
269+
p.Results.SetSession(grain.UiSession{Client: client})
269270
return nil
270271
}
271272

0 commit comments

Comments
 (0)