Message Archiving component should return custom message fields e.g XEP-0004 (#5)
Closed
Łukasz Soszyński opened 1 decade ago

Currently Message Archiving component save genuine stanza in database. When XMPP client retrieve message only body element is returned. For instance:

When database contains message:

<message time="1394548699744" xmlns="jabber:client" to="20@localhost" from="1@localhost" id="dyP9g-19">
    <subject>Messagw with XEP-0004</subject>
    <body>Contains Data Forms</body>
        <x type="submit" xmlns="jabber:x:data">
                 <field type="text-single" var="name">
                        <value>James</value>
              </field>
                <field type="text-single" var="surname">
                        <value>Bond</value>
              </field>
                <field type="text-single" var="date">
                        <value>1374144203775</value>
                </field>
        </x>
</message>

then Message Archiving component return:

   <to secs='242'>
        <body>Contains Data Forms</body>
   </to>

It would be nice if additional fields appear in response :)

More details: [[https://projects.tigase.org/boards/19/topics/1616?r=1620#message-1620]]

Andrzej Wójcik (Tigase) commented 1 decade ago

I've changed method responsible for retrieving messages for database - now it will return every element inside <messsage/> element.

But as in most cases we would like to store only <body/> element, I've added support for setting what parts or <message/> will be saved.

Now by default if message archiving is enabled only <body/> element will be saved. To save other elements of a <message/> as well, you need to send following xml to server to enable full message logging for this account

<iq type='set' id='pref2'>
  <pref xmlns='urn:xmpp:archive'>
    <default otr='forbid' save='message'/>
  </pref>
</iq>

or you will need to set required message logging to message by adding following line to etc/init.properties which will force full message logging for all accounts on this server

sess-man/plugins-conf/message-archive-xep-0136/required-store-method=message
Andrzej Wójcik (Tigase) commented 8 years ago

Closing due to no response from user and feature is know to work.

issue 1 of 1
Type
New Feature
Priority
Normal
Assignee
RedmineID
1777
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-message-archiving#5
Please wait...
Page is in error, reload to recover