Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function sendText(params: Typings.Action.Send.Params) {
const {imId, chatType, message, ext} = params;
if (message.data.isSystem) {
return ChatManager.insertSystemMessage(
imId,
chatType,
message.data.text,
message.timestamp,
message.localTime,
ext
);
} else {
return ChatManager.sendText(
imId,
chatType,
message.data.text,
{
atMemberList: message.data.atMemberList,
...ext,
},
);
}
}