messages which owner is room other participant, doesn't contain x tag.
Read carefully this paragraph from https://xmpp.org/extensions/xep-0313.html#business-storeret-muc-archives
In the case of non-anonymous rooms or if the recipient of the MUC archive has the right to access the sender real JID at the time of the query, the archive message will use extended message information in an element qualified by the 'http://jabber.org/protocol/muc#user' namespace and containing an child with a 'jid' attribute specifying the occupant's full JID, as defined for non-anonymous room presence in Multi-User Chat (XEP-0045) [10].
In practice, this means that you must configure the room and set this option:
Present real Jabber IDs to: anyone
Or if you want this in all the new rooms, configure in ejabberd.yml
modules:
mod_muc:
default_room_options:
anonymous: false