add a little more plugin options for people who make plugins that need to be auto loaded.
This commit is contained in:
@@ -37,8 +37,8 @@ export default {
|
||||
ctx.log.info("server plugin started");
|
||||
},
|
||||
|
||||
async onEvent(ctx, event) {
|
||||
ctx.log.info(`plugin event from ${event.clientId}`);
|
||||
async onEvent(ctx, clientId, event, payload) {
|
||||
ctx.log.info(`${event} from ${clientId}: ${JSON.stringify(payload)}`);
|
||||
},
|
||||
|
||||
rpc: {
|
||||
@@ -53,6 +53,8 @@ export default {
|
||||
};
|
||||
```
|
||||
|
||||
`onEvent` receives events emitted by that plugin's client module.
|
||||
|
||||
## The `ctx` Object
|
||||
|
||||
| Field | Description |
|
||||
|
||||
Reference in New Issue
Block a user