* @see com.sissi.persistent.impl.PersistentMessage#write(com.sissi.protocol.Element)
*/
@Override
public Map<String, Object> write(Element element) {
Map<String, Object> entity = super.write(element);
Message message = Message.class.cast(element);
if (message.delay()) {
entity.put(Dictionary.FIELD_SOURCE, message.getDelay().getFrom());
entity.put(Dictionary.FIELD_DELAY, message.getDelay().getStamp());
entity.put(Dictionary.FIELD_FROM, super.jidBuilder.build(element.getFrom()).asStringWithBare());
} else {
entity.put(Dictionary.FIELD_SOURCE, this.relationMucMapping.mapping(super.jidBuilder.build(element.getFrom())).jid().asString());
}
return entity;