SysUpdateMessage
tip
This method is available in Cloud Code scripts only.
Update the content of the specified message.
Service | Operation |
---|---|
messaging | SYS_UPDATE_MESSAGE |
Method Parameters
Parameter | Description |
---|---|
msgId | The id of the message to update. |
msgVer | The version of the message. |
content | The new content to write to the message. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var msgId = "e7d15e38-1bc7-40bd-aecf-80ea38b11992";
var msgVer = 1;
var contentJson = {
"subject": "New features",
"text": "Chat and messaging features coming soon..."
};
var messagingProxy = bridge.getMessagingServiceProxy();
var postResult = messagingProxy.sysUpdateMessage(msgId, msgVer, contentJson);
if (postResult.status == 200) {
// Success!
}
{
"service": "messaging",
"operation": "SYS_UPDATE_MESSAGE",
"data": {
"msgId": "e7d15e38-1bc7-40bd-aecf-80ea38b11992",
"msgVer": 1,
"contentJson": {
"subject": "New features",
"text": "Chat and messaging features coming soon..."
}
}
}
JSON Response
{
"status": 200,
"data": {
"actual": 0,
"requested": 1,
"msgId": "e7d15e38-1bc7-40bd-aecf-80ea38b11992"
}
}
Common Error Code
Status Codes
Code | Name | Description |
---|---|---|
40601 | FEATURE_NOT_ENABLED | Messaging feature is not enabled for app. |