Can't query for archive messages preference state

Andrew Trumper
Added over 1 year ago

I'm asking for a preferences to do with archived messages like this:

"<iq type='get' id='prefq'> <pref xmlns='urn:xmpp:archive'></pref> </iq>"

and I'm getting back a more-or-less empty response like this:

"<iq id="prefq" to="adder@andrew/TestApplication" type="result"></iq>"

I'm not sure what's going on here. The message archiving system seems to be enabled

<iq id="XjfeL-2" to="andrew@andrew/TestApplication" from="andrew" type="result">
  <query xmlns="">
    <identity category="component" name="Tigase ver. 7.1.0-b4379/8ed39c0c (2017-01-30/19:29:59)" type="im"/>
    <identity category="server" name="Tigase ver. 7.1.0-b4379/8ed39c0c (2017-01-30/19:29:59)" type="im"/>
    <identity category="pubsub" name="null" type="pep"/>
    <feature var=""/>
    <feature var="urn:xmpp:carbons:2"/>
    <feature var=""/>
    <feature var="jabber:iq:auth"/>
    <feature var="vcard-temp"/>
    <feature var=""/>
    <feature var="msgoffline"/>
    <feature var=""/>
    <feature var=""/>
    <feature var="msgoffline"/>
    <feature var="urn:xmpp:ping"/>
    <feature var="urn:ietf:params:xml:ns:xmpp-sasl"/>
    <feature var=""/>
    <feature var=""/>
    <feature var=""/>
    <feature var="urn:xmpp:archive:auto"/>
    <feature var="urn:xmpp:archive:manage"/>
    <feature var="jabber:iq:roster"/>
    <feature var="jabber:iq:roster-dynamic"/>
    <feature var="jabber:iq:version"/>
    <feature var="urn:xmpp:time"/>
    <feature var="jabber:iq:privacy"/>
    <feature var="urn:ietf:params:xml:ns:xmpp-bind"/>
    <feature var=""/>
    <feature var="urn:ietf:params:xml:ns:vcard-4.0"/>
    <feature var="urn:ietf:params:xml:ns:xmpp-session"/>
    <feature var="jabber:iq:private"/>

Other requests return more-or-less empty packets too:

"<iq type='get' id='juliet1'> <list xmlns='urn:xmpp:archive' with='adder@andrew'> <set xmlns=''><max>30</max></set> </list></iq>"


"<iq type='set' id='auto1'><auto save='true' xmlns='urn:xmpp:archive'/></iq>"

What should I be looking for?

Replies (3)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 1 year ago

It is hard to tell what is wrong. It may be related to the configuration of your installation. I've sent same request as you and I've got proper response:

<iq type="result" to="" id="prefq">
<pref xmlns="urn:xmpp:archive">
<auto save="false"/>
<default otr="forbid" muc-save="false" save="body"/>
<method use="prefer" type="auto"/>
<method use="prefer" type="local"/>
<method use="prefer" type="manual"/>

Added by Andrew Trumper over 1 year ago

My init properties looks like this:

--comp-class-1 = tigase.muc.MUCComponent
--virt-hosts = andrew
--user-db-uri = jdbc:derby:/home/andrew/tigase/tigasedb
--user-db = derby
--admins = admin@andrew
--comp-name-4 = message-archive
--comp-name-3 = proxy
config-type = --gen-config-def
--comp-name-2 = pubsub
--comp-name-1 = muc
--cluster-mode = true
--sm-plugins = +message-archive-xep-0136,+jabber:iq:auth,+urn:ietf:params:xml:ns:xmpp-sasl,+urn:ietf:params:xml:ns:xmpp-bind,+urn:ietf:params:xml:ns:xmpp-session,+jabber:iq:register,+jabber:iq:roster,+jabber:iq:privacy,+jabber:iq:version,+,+starttls,+msgoffline,+vcard-temp,+,+jabber:iq:private,+urn:xmpp:ping,+basic-filter,+domain-filter,+pep,-zlib
--debug = server
--comp-class-4 = tigase.archive.MessageArchiveComponent
--comp-class-3 = tigase.socks5.Socks5ProxyComponent
--comp-class-2 = tigase.pubsub.PubSubComponent


(I'm on Tigase 7.1)

Added by Andrew Trumper over 1 year ago

Andrew Trumper wrote:

What should I be looking for?

It turns out the Smack XMPP library I was using didn't support archive messaging and was stripping out all the fields it didn't understand - which was everything. I thought I was printing out the underlying XML but it turns out it was just an XML representation of the data the library actually understood. :(