receiverList).
createXxxMessage API (here, Xxx indicates the message type) to create a message (specify the message recipients via receiverList).sendMessage API to send the message.// Create a targeted group messagelet message = chat.createTextMessage({to: 'test',conversationType: TencentCloudChat.TYPES.CONV_GROUP,payload: {text: 'Hello world!'},receiverList: ['user0', 'user1']});// Send the messagelet promise = chat.sendMessage(message);promise.then(function(imResponse) {// Message sent successfullyconsole.log(imResponse);}).catch(function(imError){// The message failed to be sentconsole.warn('sendMessage error:', imError);});
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários