new ChatPlugin()
Constructor for Chat plugin.
Instance will be created each time when new WTAPI instance is created.
Plugin could be accessible thought WTAPI with chat property.
Plugin could be accessible thought WTAPI with chat property.
- Source:
- Tutorials:
Extends
- Observer
Methods
send(user, message)
Sends a message to user.
Parameters:
Name | Type | Description |
---|---|---|
user |
WTAPI.User | |
message |
WTAPI.Message |
- Source:
sendDeliveryConfirmation(user, message)
Sends a notification that message are read by user.
Parameters:
Name | Type | Description |
---|---|---|
user |
WTAPI.User | A user that send message |
message |
WTAPI.Message |
- Source:
Events
message_delivered
Indicates that message is read by destination.
Properties:
Name | Type | Description |
---|---|---|
user |
WTAPI.User | |
id |
string | Id message delivered |
- Source:
message_received
Indicates that new message is received from remote user.
Properties:
Name | Type | Description |
---|---|---|
user |
WTAPI.User | |
message |
WTAPI.Message |
- Source: