Trigger Reference of GS2-Inbox Script
Reference for event triggers that call extended scripts, as defined in GS2-Inbox
receiveMessage
Event trigger to call GS2-Script before a message is received.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
message | Message | Message |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow messages to be received |
overrideMetadata | string | | | ~ 4096 chars | Metadata after overwriting |
Implementation Example
namespace = args.namespace
message = args.message
result = {
permit=permit,
overrideMetadata=overrideMetadata
}
receiveMessageDone
GS2-Script called after a message is received.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
message | Message | Message |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
message = args.message
result = {
}
readMessage
Event trigger to call GS2-Script before a message is opened.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
message | Message | Message |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow messages to be opened |
Implementation Example
namespace = args.namespace
message = args.message
result = {
permit=permit
}
readMessageDone
GS2-Script called after a message is opened.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
message | Message | Message |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
message = args.message
result = {
}
deleteMessage
Event trigger to call GS2-Script before a message is deleted.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
message | Message | Message |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow message deletion |
Implementation Example
namespace = args.namespace
message = args.message
result = {
permit=permit
}
deleteMessageDone
GS2-Script called after a message is deleted.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
message | Message | Message |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
message = args.message
result = {
}