use of com.hyphenate.chat.adapter.message.EMAMessage in project SmartCampus by Vegen.
the class EaseDingMessageHelperTest method createDingMessage.
private EMMessage createDingMessage(String conversationId, String originalMsgId) {
EMAMessage _msg = EMAMessage.createSendMessage("", "", null, EMMessage.ChatType.Chat.ordinal());
_msg.setTo(conversationId);
EMMessage msg = new EMMessage(_msg);
msg.setMsgId(originalMsgId);
EMTextMessageBody txtBody = new EMTextMessageBody("1");
msg.addBody(txtBody);
msg.setAttribute(KEY_DING, true);
msg.setChatType(EMMessage.ChatType.GroupChat);
return msg;
}
use of com.hyphenate.chat.adapter.message.EMAMessage in project SmartCampus by Vegen.
the class EaseDingMessageHelperTest method createDingAckMessage.
private EMMessage createDingAckMessage(String conversationId, String originalMsgId, String from) {
EMAMessage _msg = EMAMessage.createSendMessage(from, "", null, EMMessage.ChatType.Chat.ordinal());
EMMessage msg = new EMMessage(_msg);
msg.setAttribute(KEY_CONVERSATION_ID, conversationId);
msg.setAttribute(KEY_DING_ACK, true);
msg.addBody(new EMCmdMessageBody(originalMsgId));
return msg;
}
Aggregations