Description

Register a callback to handle incoming messages.

Used in conjunction with partyEmit().

Syntax

partySubscribe(eventName, callback)

Parameters

eventName

string: the event name to subscribe to

callback

function: function to be called when event is received.

will receive the message’s dataObject as a parameter

Returns

none