dynamically enable Webhooks

Options
Is it posssible to enable and disable webhooks through the code (dynamically)?
I'm trying to separate calling webhook on player left room in lobby and left room during the game.
I connected photon with playfab and want to save time when player left the game. Unfortunately webhook is also calling when player left from room in lobby.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @Hylus,

    Thank you for choosing Photon!

    With Photon Realtime WebHooks only paths configured in the dashboard are used.
    Also, only PathEvents and PathGameProperties can be optionally sent or not depending on a client request parameter.

    For PathLeave, if it's configured, it will be fired.
    The client can choose to send AuthCookie optionally though (when available).
    Unfortunately webhook is also calling when player left from room in lobby.
    I'm having trouble understanding the issue here. PathLeave is called every time the client leaves the room or disconnects while joined to a room. If you are using a room as a "lobby" instead of Photon's built-in lobbies, then from PlayFab make a difference between "lobby rooms" and other rooms using the GameId or maybe room property.