Skip to main content
Version: 5.7.0

UpdateChatMessage

Update the specified chat message. Message must have been from this user. Version provided must match (or pass -1 to bypass version enforcement).

ServiceOperation
chatUPDATE_CHAT_MESSAGE

Method Parameters

Method Parameters

ParameterDescription
channelIdThe channel of the message
msgIdThe message id
versionThe version of the message. Pass it -1 to bypass version checking.
contentJsonReplacement content for the message

Usage

http://localhost:3000
string channelId = "55555:gl:bcDev";
string msgId = "123456789";
int version = 1;
string contentJson = "{\"text\":\"New plain text message\",\"custom\":{\"somethingNew\":\"amazing\"}}";
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};

_bc.ChatService.UpdateChatMessage(channelId, msgId, version, contentJson, successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": {}
}
Common Error Code

Status Codes

CodeNameDescription
40346INSUFFICIDENT_PERMISSIONSThe channel id provided is invalid.
40595CHAT_MESSASAGE_NOT_FOUNDThe specified message cannot be found
40601RTT_NOT_ENABLEDRTT must be enabled for this feature
40603CHAT_UNRECOGNIZED_CHANNELThe specified channel is invalid