Real-time parties create rules using runtime code

Is there a way to create rules on which users can create parties with before hooks using runtime code?

Hi @formatCvt

Yes we have support for adding before/after hooks for party messages. If you’re using the Go server runtime you should be good. If you’re using TypeScript you may see an error as the type definitions is yet to be updated but by providing the correct string (e.g. "PartyJoin") it should work correctly.

We’ll update our documentation to cover this.

Hi @tom
I’m working on creating parties for my game. We’re using the Go server. From my understanding, parties are only available using C# client SDK. Is there any place where I can find information about using server runtime code instead of the client?

Hi! Can you please help with PartyJoin hooks in TypeScript?

Hi @formatCvt,

The message names have been updated in our documentation (Nakama: Introduction | Heroic Labs Documentation) and are available in the TypeScript definitions in the latest release of nakama-common.

Is there any particular issue you need help with?

Nice! Thanks! I’ve see only party hooks and what about functions to work with party? Something like functions for groups - Nakama: Function Reference | Heroic Labs Documentation

Parties are interacted with via the client.

ok, looks like parties feature are semi-authoritative, because we can’t join/ban/leave user or send data to party by server-side logic

Yes you can think of a party like an ephemeral group. Any user can create one, they will then become the party leader. That user can then invite, promote, remove other users as well as close the party. This is all initiated via the client.

If the party leader disconnects without first closing the party, the server will choose a new party leader.

The Parties section of our documentation provides more context Nakama: Parties | Heroic Labs Documentation