/**
* Given a set of parameters, create a request to send to the backend.
*/
private XmppMessageRequest createMessageRequest(Message message) {
XmppMessageRequest request = new XmppMessageRequest();
for (JID jabberId : message.getRecipientJids()) {
request.addJid(jabberId.getId());
}
request.setBody(message.getBody());
request.setRawXml(message.isXml());
request.setType(message.getMessageType().getInternalName());
if (message.getFromJid() != null) {
request.setFromJid(message.getFromJid().getId());
}
return request;
}