To enable this feature Message Archiving component needs to be configured properly. You need to add tags-support = true
line to message-archiving
configuration section of etc/config.tdsl
file. Like in following example:
message-archive { tags-support = true }
where:
message-archive
- is name of configuration section under which Message Archiving component is configured to runBy default, Tigase Message Archive will only store the message body with some metadata, this can exclude messages that are lacking a body.
If you decide you wish to save non-body elements within Message Archive, you can now can now configure this by setting msg-archive-paths
to list of elements paths which should trigger saving to Message Archive.
To additionally store messages with <subject/>
element:
sess-man { message-archive { msg-archive-paths = [ '-/message/result[urn:xmpp:mam:1]' '/message/body', '/message/subject' ] } }
Where above will set the archive to store messages with <body/> or <subject/> elements and for message with <result xmlns="urn:xmpp:mam:1"/>
element not to be stored.
It is recommended to keep entry for not storing message with <result xmlns="urn:xmpp:mam:1"/>
element as this are results of MAM query and contain messages already stored in archive!
Enabling this for elements such as iq, or presence will quickly load the archive. Configure this setting carefully!