Webhooks - how to send full state of the room?
Options
The document says:
State: a serialized snapshot of the room's full state. It's sent only if SendState webflag is set when calling OpSetCustomProperties.
I change LoadbalancingPeer.cs but it still does not work. (SendState = 0x08)
before
State: a serialized snapshot of the room's full state. It's sent only if SendState webflag is set when calling OpSetCustomProperties.
I change LoadbalancingPeer.cs but it still does not work. (SendState = 0x08)
before
if (webForward)after
{
opParameters[ParameterCode.EventForward] = true;
}
if (webForward)
{
opParameters[ParameterCode.EventForward] = (byte)(0x01 | 0x08);
}
0
Comments
-
Hi @Rusildo,
Please make sure to choose correct version of webhooks plugin when configuring it.
The webflags were introduced in 1.2.
So you need to select 1.2 from the dropdown list.
Also in order to forwardState
, "IsPersistent" needs to be set totrue
.
We will update the docs.
Thank you for your report.1 -
Please make sure to choose correct version of webhooks plugin when configuring it.
Selected 1.2b version.Also in order to forward State, "IsPersistent" needs to be set to true.
It's works for "GameProperties"? Or only for "GameCreate/GameClose"? I set "IsPersistent=true" but nothing has changed0 -
Sorry I did not give full accurate info.
"IsPersistent" is ignored when "PathCreate" or "PathClose" are not set.
So currently this is needed, even if you do not use those paths, just configure them and just return an empty successful response in "PathCreate" and ignore saving state in "PathClose".
FYI: the source code for Webhooks plugin is available in the Photon Server Plugins SDK.
We will fix these webhooks gotchas in the upcoming version.
If you have any suggestions or other feedback please do let us know.1 -
-deleted-0